In what situation you would use multiple version of jQuery and how would you include them?
Answer Posted / chaitanya
Well, it is quite possible that the jQuery plugins which are used are dependent on older version but for your own jQuery code, you would like to use newer version. So because of this dependency, multiple version of jQuery may required sometimes on single page.
Below code shows how to include multiple version of jQuery.
Hide Copy Code
<script type='text/javascript' src='js/jquery_1.9.1.min.js'></script>
<script type='text/javascript'>
var $jq = jQuery.noConflict();
</script>
<script type='text/javascript' src='js/jquery_1.7.2.min.js'></script>
By this way, for your own jQuery code use "$jq", instead of "$" as "$jq" refers to jQuery 1.9.1, where "$" refers to 1.7.2.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the use of queue() in jquery?
Difference between document.ready and window.onload? : jQuery Mobile
How to get the style property of an element using ?
Define bind() and unbind elements in jQuery?
How does jquery mobile theming work? : jquery mobile
Explain the difference between jquery.size() and jquery.length?
Explain the use of each function in jquery?
What is meant by the term ‘theming’ in jquery mobile? : jQuery Mobile
Explain .delegate()? : jquery mobile
Different ways of using $.connect function in jquery?
Which is the fastest selector in jQuery?
What is the difference between jquery.get() and jquery.ajax()?
What is event.stoppropagation? : jquery mobile
Can there be more than one ready function in jquery?
Why do we use jquery? : jquery mobile