Please upgrade here. These earlier versions are no longer being updated and have security issues.

Where to put additional jQuery plugins?

businessdadbusinessdad Stealth contributor MVP
edited March 2012 in Vanilla 2.0 - 2.8

Hi again,
I need to install an extra jQuery plugin to use it in my Vanilla plugin, and I was wondering what's the recommended place where to put it (it requires some extra CSS, too).

Initially, I thought of putting it in subdirectory of my plugin's directory, but, on the other hand, I might need it again and I'd like not to install it multiple times.

Also, all the examples I found call the "AddJs" somewhere in the initialization, but, this way, the JS file gets loaded in every page, and not only when needed. Is there some sort of "conditional load", or can I freely implement it myself? For example, checking the path and deciding if I should load it or not.

Thanks for the help.

Comments

Sign In or Register to comment.