LOG IN
Back to Blog

In order to use jQuery with myRealPage custom layouts, you need to set jQuery library into the “noConflict” mode. This is what your code that includes jquery should look like:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
window.$j = jQuery.noConflict();
</script>

Note, the: window.$j = jQuery.noConflict(); This assigns the typical “$” jQuery symbol to the “$j” symbol which you can now use instead throughout your code. For example, instead of using this:

$( “.some-element” ).each( …. )

You will use this:

$j( “.some-element” ).each( … )

 

Comments

No comments

Post Your Comment:

*indicates required fields.
Your Name:*
Please note, your email will not be shown publicly
Your Email (will not be published):*
Comment:*
Please type the text as it appears above: