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

What is parseint() and why it is used?

0 Answers  


Mention the advantages of cdn? : jQuery Mobile

0 Answers  


And finally, if you could give one tip to any new budding jquery ui developers, what would it be?

0 Answers  


What is event.stoppropagation? : jquery mobile

0 Answers  


What is jQuery plugin and what is the advantage of using plugin?

1 Answers  


Explain width() vs css(‘width’)?

0 Answers  


Which version of jquery file should be used?

0 Answers  


What is the difference between jquery's ready and holdready?

0 Answers  


What is the need for jquery? : jQuery Mobile

0 Answers  


What are selectors in jQuery and how many types of selectors are there?

1 Answers  


What is the difference between $.map and $.grep in jQuery?

0 Answers  


How does jquery store data related to an element?

0 Answers  


Categories