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


Please Help Members By Posting Answers For Below Questions

What are the selectors in jquery? How many types of selectors in jquery?

441


How to search for descendant elements that match the specified selectors using ?

440


Explain the animate function.

491


What does dollar sign ($) me in jquery?

492


How to executed jquery selectors? : jquery mobile

454






How to check or uncheck all checkboxes using jquery?

442


Explain .empty() vs .remove() vs .detach().

500


What are the advantages of method chaining in jquery?

473


Explain finish method in jquery? : jquery mobile

452


Where jquery mobile works? : jquery mobile

456


Hide and show image on button click using jQuery?

441


Explain some benefits of jquery knockout?

453


How method can be called inside code behind using jQuery?

452


How can an element be checked if it contains a specific class?

388


How to add or remove classes to an element in jquery?

428