Inclusion of more than two JQuery libraries creates problems -
i including these jquery libraries:
src="jquery/jquery-1.4.2.min.js" src="jquery/jquery-ui-1.8.6.custom.min.js src="jquery/menu_login.js" src="gjquery/jquery-1.2.6.min.js" src="gjquery/jquery-ui-personalized-1.6rc2.min.js src="gjquery/jquery.flickr-1.0.js" "gjquery/jquery.flickrgallery-1.0.2.js" <script type="text/javascript"> $().ready(function(){ $('#gallery').flickrgallery({ galleryheight: 450 }); }); </script>
in code, including 3 jquery libraries in web application. have 2 queries in web application before it's working fine, when have added flickr library, it's doing problem. problem include flickr library, other 2 stop working. if change order of inclusion flickr library stops wroking or other 2 1 not doing work. idea?
what purpose behind including multiple versions of jquery?
if can, use 1 (newest hopefully) version.
alternatively, if each plugin using requires different version, use noconflict , make sure each plugin gets correct version needs. can use closures , self invoking functions still use $ normal, while controlling version you're using.
<script src="http://code.jquery.com/jquery-1.4.2.js"></script> <!-- other scripts depend on 1.4.2 ---> <script> var $.1.4.2 = $.noconflict(true); </script> <script src="http://code.jquery.com/jquery-1.2.6.js"></script> <!-- other scripts depend on 1.2.6 ---> <script> var $.1.2.6 = $.noconflict(true); </script> <script> (function($){ // $ in here jquery 1.4.2 })($.1.4.2); (function($){ // $ in here jquery 1.2.6 })($.1.2.6); </script>
Comments
Post a Comment