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 are selectors in jquery mean ?

0 Answers  


Is jquery a framework?

0 Answers  


What is difference between .setinterval() and .delay() ?

0 Answers  


Can you write a code to select all links inside the paragraph?

0 Answers  


How can you disable jquery animation?

0 Answers  


What is jQuery.noConflict?

1 Answers  


What are the effects methods used in jquery?

0 Answers  


Which version of jquery file should be used?

0 Answers  


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

1 Answers  


Define "beforesend(xhr)" paremeter of jquery ajax method?

0 Answers  


Define animate function in jquery?

0 Answers  


What is the difference between parent() and parents() methods in jQuery?

1 Answers  


Categories