Friday, July 10, 2015

Handling Multiple JQuery Versions

Although I don't recommend it. If you've ever need to use multiple JQuery versions, then I hope this helps. I recently worked on a project that needed to use multiple JQuery plugins.


 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
 <script type="text/javascript" src="Scripts/simpleZoom.js"></script> 
<script type="text/javascript"> //Create new variable and set it to now conflict. var jQuery_1_9_1 = $.noConflict(true); //Now, anytime you use this version, you'll need to use this variable. $(function () { jQuery_1_9_1('#show').simpleZoom({ zoomBox: "#zoom", markSize: [120, 169], zoomSize: [240, 338], zoomImg: [480, 677] }); }); </script>

No comments:

Post a Comment