In what situation you would use multiple version of jQuery and how would you include them?



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

Post New Answer

More jQuery Interview Questions

Can jquery be used to make an ajax request?

0 Answers  


How to use connect in jquery?

0 Answers  


Explain various methods to make ajax request in jquery? : jquery mobile

0 Answers  


Can you please explain the difference between event.preventdefault and "return false"? : jquery mobile

0 Answers  


Explain the basic need to start with jquery? : jquery mobile

0 Answers  






What is a jquery library?

0 Answers  


Explain jquery $.ajax() method?

0 Answers  


Explain each() function in jquery?

0 Answers  


Explain the difference between $(this) and 'this' in jquery?

0 Answers  


what is the use of param() method in jquery .

0 Answers  


How can we apply css in odd childs of parent node using jquery library?

0 Answers  


Tell me what are the slow selectors in jquery? : jquery mobile

0 Answers  


Categories