I am trying to use jQuery in my Fisheye servlet plugin but cannot seem to find any documentation on how to make it available. I see a #requireResource directive for my template but it refers to confluence's jquery. Trying that and changing confluence to fecru did not work either.
Community moderators have prevented the ability to post new answers.
jQuery is included into every page as part of AUI (Atlassian UI). jQuery can be access via the AJS.$
or AJS.jQuery
variables
Am new to jQuery so a little learning was in order. I see that my third party's code follows jQuery best practice and effectively has its $ passed in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply Jason! I assume that if I have a third party component that is based on jQuery that I would have to edit the "$" in their code to use "AJS.$".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Generally speaking you probably want to wrap your code in a closure
(function($) {
// Code goes here
})(AJS.$)
and continue to use $ in your code but if you want to you can replace all usages of $ with AJS.$
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.