jQuery 1.6

Siddharth Bhojnagarwala November 7, 2011

Well actually I want to use jQuery 1.6 or above for one of the tooltip. But If I am placing this line in Custom HTML (at the end of head):
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

The feature I want(tootip) is working fine but When I go to Add/Edit Page and try to use the Other Macros or even editing the macros, Nothing is showing up. But when I try removing the above line, everything seems fine.

Please tell me how to integrate jquery version 1.6 or above in my Confluence without having any problem?

Using Confluence 4.03

3 answers

0 votes
Joey McDaniel January 3, 2012

Hi Siddharth,

I had to update my javascripts to use another variable to call jQuery. I did so using a noConflict statement in the header:

<script>XXX= jQuery.noConflict(true);</script>

Where XXX is the new variable you would use instead of $ in your javascript.

Hope this helps!

0 votes
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 8, 2011

Confluence 4 appears to be running jquery 1.5.2.

If you want to load a different version of jQuery into the Confluence UI, you will need to follow the instructions in the jQuery docs on how to load them side-by-side: http://api.jquery.com/jQuery.noConflict/

0 votes
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 7, 2011

Confluence already includes jQuery. Why add another instance? Can't you just use the slightly older version instead?

Siddharth Bhojnagarwala November 7, 2011

No actually I am using Tipped (http://projects.nickstakenburg.com/tipped) which uses jQuery 1.6 or above. Can you please tell me how to integrate v 1.6 in Confluence without any conflicts with the existing one? By the way, which version does it already contain/inbuilt?

BJ Yang November 7, 2011

Is there a certain way we have to access the jQuery provided by Confluence. If I'm not mistaken, it's inside of a file called batch.js, correct? My jQuery functions (simple fadeIn/fadeOut) don't work so I have to use a script src to include an external jQuery file. However, when I do this, my keyboard shortcuts lose functionality. If I can find out how to use the jQuery functions provided by Confluence, it might solve my problem.

David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 7, 2011

@BJ Yang: It's namespaced as AJS.$ instead of just $ or jQuery.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events