jLoad - Javascript loader library |
[eluser]fatnic[/eluser]
OK. Not sure if this has been done before but here it is anyway. jLoad is basically a library to help load required javascript files quickly into a view. You can download the zip here First you need the jLoad config file. Here is where you set the path to your javascript files, set autoloading files and groups of files. Code: // Javascript path Then to use the library ensure you place the following in the head of your view file. Code: <?php if (isset($javascript)) echo $javascript; ?> Then in your controller you can use Code: // Load the library (autoloading scripts added) Now all the required script tags will automatically be inserted into your view. Anyway, like I said, this has probably been done before but it's something I needed and cooked up quickly. Thought I would share. Feel free to comment or suggest some ways to make it better. I've not been using CI long and could do with some tips. Cheers. |
Messages In This Thread |
jLoad - Javascript loader library - by El Forum - 09-03-2008, 09:16 AM
jLoad - Javascript loader library - by El Forum - 09-04-2008, 03:15 AM
jLoad - Javascript loader library - by El Forum - 09-04-2008, 03:30 AM
jLoad - Javascript loader library - by El Forum - 09-06-2008, 02:58 AM
jLoad - Javascript loader library - by El Forum - 09-06-2008, 05:28 AM
|