Shamith K S asked this question · 31 karma · Aug 22 '11 at 12:29 AM
Can we use jQuery in .vm ?
if yes, how ??
I wouldn't say it's "bad" as Alexy suggest, only a bit inconvenient - you can run into conflict between jQuery's $ and Velocity's $" In order to avoid problems, you need to assign $ to another variable:
var q = AJS.$;
Of course if you have a large script, it's better extracted into a separate .js file and included on in the .vm via webResourceManager.