164
edits
Changes
From All n One's bxp software Wixi
no edit summary
== How to use in bxp ==
The first thing that you will have to do is import the jQuery library into the area of bxp that you wish to user use jQuery.
When useing jQuery in bxp you must make sure that the first line of code in your JS file is as below. Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery's case, $ is just an alias for jQuery, so all functionality is available without using $.We need to use other JavaScript library alongside jQuery, return control of $ back to the other library with a call to $.noConflict(). Old references of $ are saved during jQuery initialization; noConflict() simply restores them.
<syntaxhighlight lang="html4strict">
<script language="javascript" type="text/javascript" src="https://ww3.allnone.ie/library/javascript/jquery/jquery-1.9.1.js" ></script>
</syntaxhighlight>
<syntaxhighlight lang="JavaScript">
var $JQ = jQuery.noConflict(); // This line is required to make jQuery Play nice with bxp
</syntaxhighlight>