Subject: [Solved] Include a Javascript file within a plugin without a templatee
Hi,
I'm writing a plugin that creates a new ABBC tag. This tag needs javascript - a lot (jQuery & co). Currently, I was not able to include a javascript file from within my plugin. I tried with UnbRequireJs but it does not seem to do anything. Rather, when used in global-scope, it said that this function does not exist, but when used inside a function, it did not produce an error but did not include the js file either.
How to go about this? I don't want to hack around other files than my plugin's files but I need to have a javascript file included in any shown page.
Edit: I may insert the js code directly into my tag's php output, but that is harakiri as the js code includes jQuery, which contains a lot of ' and " things.....
I'm writing a plugin that creates a new ABBC tag. This tag needs javascript - a lot (jQuery & co). Currently, I was not able to include a javascript file from within my plugin. I tried with UnbRequireJs but it does not seem to do anything. Rather, when used in global-scope, it said that this function does not exist, but when used inside a function, it did not produce an error but did not include the js file either.
How to go about this? I don't want to hack around other files than my plugin's files but I need to have a javascript file included in any shown page.
Edit: I may insert the js code directly into my tag's php output, but that is harakiri as the js code includes jQuery, which contains a lot of ' and " things.....

Pompei2
Show profile
Link to this post