![]() |
Insering javascript into html head from library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Insering javascript into html head from library (/showthread.php?tid=34797) |
Insering javascript into html head from library - El Forum - 10-09-2010 [eluser]nuwanda[/eluser] If I want to make sure that some javascript is loaded every time a class is, what's the best way? I've thought of providing a method that could be used like: Code: $this->someclass->inject_script(); Of course that would rely on the user making sure they used it correctly, which is no big deal but is there a way for my class to achieve the script injection without the use of the above method? Insering javascript into html head from library - El Forum - 10-10-2010 [eluser]CroNiX[/eluser] Why reinvent the wheel? http://ellislab.com/forums/viewthread/101236/ (I use this a lot) http://ellislab.com/forums/viewthread/117966/ Im sure theres others of you search around for an asset manager. |