In what situation you would use multiple version of jQuery and how would you include them?
Answer / 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 |
What are two different version of jquery library? : jquery mobile
Define width() vs css('width')?
Can you use multiple document.ready() function on the same page?
What is the difference between jQuery and jQuery UI?
How does caching helps and how to use caching in jQuery?
Explain .on()? : jquery mobile
What is difference between .setinterval() and .delay() ?
What does dollar sign ($) means in jquery? : jquery mobile
What is jquery a client or server scripting?
Can we select a element having a specific class in jquery ?
Explain the difference between find and children methods in jquery?
What are the advantages of jQuery?