By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,934 Members | 1,449 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,934 IT Pros & Developers. It's quick & easy.

multiple jquery script conflict?

100+
P: 120
hi guys

i really dont understand where i am going wrong.I've read countless articles including http://blog.nemikor.com/2009/10/03/using-multiple-versions-of-jquery/ but still having trouble with multiple versions of jquery not working. either the jquery slideshow doesnt work or the jquery ie select width fix doesnt work! rrghhh

Expand|Select|Wrap|Line Numbers
  1. <head>
  2. <link href="/css/styles.css" rel="stylesheet" type="text/css" />
  3. <script type="text/javascript" src="/ie6pngfix/iepngfix_tilebg.js"></script><!-- ie6 png fix -->
  4. <script type="text/javascript" src="/js/ddlevelsmenu.js"></script><!-- drop down menu js -->
  5.  
  6. <script type="text/javascript" src="/js/jquery-1.4.4.min.js"></script><!-- slideshow jquery file 1 -->
  7. <script type="text/javascript" src="/js/slides.min.jquery.js"></script><!-- slideshow jquery file 2 -->
  8. <!-- slideshow jquery controls -->
  9. <script type="text/javascript">
  10. jQuery(function () {
  11. // Set starting slide to 1
  12. var startSlide = 1;
  13. // Get slide number if it exists
  14. if (window.location.hash) {
  15. startSlide = window.location.hash.replace('#', '');
  16. }
  17. // Initialize Slides
  18. jQuery('#slides').slides({
  19. preload: true,
  20. preloadImage: 'img/loading.gif',
  21. generatePagination: true,
  22. play: 5000,
  23. pause: 2500,
  24. slideSpeed: 1200,
  25. hoverPause: true,
  26. // Get the starting slide
  27. start: startSlide,
  28. animationComplete: function (current) {
  29. // Set the slide number as a hash
  30. // window.location.hash = '#' + current;
  31. }
  32. });
  33. });
  34. </script>
  35. <script type="text/javascript">
  36. var jQuery_1_4_4 = $.noConflict(true);
  37. </script>
  38.  
  39.  
  40. <script type="text/javascript" src="/js/prototype.js"></script><!-- lightbox aka image viewer js file 1 -->
  41. <script type="text/javascript" src="/js/scriptaculous.js?load=effects,builder"></script><!-- lightbox aka image viewer js file 2 -->
  42. <script type="text/javascript" src="/js/lightbox.js"></script><!-- lightbox aka image viewer js file 3 -->
  43. <script type="text/javascript">
  44. jQuery.noConflict();
  45. jQuery(document).ready(function(jQuery) {
  46. </script>
  47.  
  48. <script type="text/javascript" src="/js/test/jquery.1-4-2.min.js"></script>
  49. <script type="text/javascript" src="/js/test/jquery.ie-select-width.js"></script>
  50. <!--[if lte ie 6]>
  51. <script type="text/javascript" src="/js/test/jquery.bgiframe.js"></script>
  52. <![endif]-->   
  53. <script type="text/javascript">
  54. $(function ()
  55. {
  56.     // Set the width via the plugin.
  57.     $('select#fixed-select-no-css').ieSelectWidth
  58.     ({
  59.         width : 200,
  60.         containerClassName : 'select-container',
  61.         overlayClassName : 'select-overlay'
  62.     });
  63.  
  64.     // Set the width via CSS.
  65.     $('select#fixed-select-css').ieSelectWidth
  66.     ({
  67.         containerClassName : 'select-container',
  68.         overlayClassName : 'select-overlay'
  69.     });
  70.  
  71.     // Borders and padding etc for Internet Explorer 6/7.
  72.     $('select#select-styleable').ieSelectWidth
  73.     ({
  74.         containerClassName : 'select-container',
  75.         overlayClassName : 'select-overlay'
  76.     });
  77. });
  78. </script>
  79. <script type="text/javascript">
  80. var jQuery_1_4_2 = $.noConflict(true);
  81. </script>
  82.  
  83. <!-- Share this button script -->
  84. <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'c0b04a1e-f627-42e8-b040-cbfb63bd9b1c'});</script>
  85. <script type="text/javascript" src="/js/showtab.js"></script>
  86. </head>
  87.  
I've tried re ordering the scripts around but still no joy? either the slideshow works or the ie select width fix doesnt but not both at the same time?

please advise
Omar.
Mar 18 '11 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
I'm sorry, but I think you should reconsider your approach. It's bad enough that you have jQuery plus prototype/scriptaculous. To have multiple versions of jQuery on top is just asking for trouble.

You should really be using just one library/framework and sticking to it. The IE6 PNG fix can be done without using jQuery (well, everything can be, but this one would be trivial without changing much).
Mar 21 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.