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 the difference between event.stopPropagation and event.stopImmediatePropagation?

1 Answers  


Write a basic jquery code?

0 Answers  


What is the difference between calling stop(true,true) and finish method?

1 Answers  


Difference between prop() and attr()? : jQuery Mobile

0 Answers  


How to get the style property of an element using ?

0 Answers  






What features of jquery, has been used in web applications?

0 Answers  


Is it possible to hold or delay document.ready execution for sometime?

1 Answers  


How to include jQuery in ASP.Net project?

0 Answers  


How can you use a jquery library in your project?

0 Answers  


What is jquery.length? : jquery mobile

0 Answers  


How can we include jQuery library in ASP.Net project?

0 Answers  


Difference between event.PreventDefault and event.stopPropagation?

0 Answers  


Categories