Insering javascript into html head from library |
[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?
[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. |
Welcome Guest, Not a member yet? Register Sign In |