Wiki source code of jquery in Confluence

Last modified by Normann P. Nielsen on 2014/01/28 13:22

Hide last authors
Normann P. Nielsen 1.1 1 Confluence 4.X ship with jquery version v1.6.4 and the jquery object can be used in [[Macro(s)>>Main.atlassian.atlassian-confluence.styling-confluence.macro-s]] and the [[Global Layout>>Main.atlassian.atlassian-confluence.styling-confluence.global-layout]] and [[Global Layouts>>Main.atlassian.atlassian-confluence.styling-confluence.global-layouts]]
2
3 **Atlassian.js (AJS)**
4
5 From Atlassian:
6
7 {{success}}To avoid depending on a particular JavaScript library too much, we have atlassian.js ("AJS") as an abstraction on top of each particular library's functions. In Confluence AJS wraps jQuery so many functions work in the same style as that library. Throughout Confluence's JavaScript, we should use AJS to make common function calls such as ##$##, ##toggleClassName##etc. wherever possible. This enables us to easily change the underlying JavaScript library later on if necessary.{{/success}}
8
9 See the [[jquery Styling samples>>Main.atlassian.atlassian-confluence.styling-confluence.jquery-styling-samples]] pages for some sporadic examples - and [[https://confluence.atlassian.com/display/CONFKB/How+to+Use+JavaScript+in+Confluence]]
10
11 Also visit [[answers.atlassian.com>>https://answers.atlassian.com/search/?t=question&q=jquery&Submit=search&topic=all]] for a lot og jquery solutions