Loading jQuery for instrumenting pages
From Market Ruler Help
Revision as of 19:02, 30 June 2016 by Admin (talk | contribs) (moved CR.jquery to Loading jQuery for instrumenting pages)
The __CR.jquery function takes a single parameter which is a callback which has the first parameter the jQuery global (typically window.jQuery or window.$).
The current version of jQuery which is loaded is 1.11.3. It is only loaded if jQuery is not detected on the page. Detection checks for the existence of the window.jQuery variable being defined.
An example of its usage is:
<script> window._crq = window._crq || []; window._crq.push(function (cr) { cr.jquery(function ($) { // Do jQuery stuff here using $ as the loaded version of jQuery }); }); </script>
For more information, read the jQuery documentation.