multiple jquery script conflict?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • omar999
    New Member
    • Mar 2010
    • 120

    multiple jquery script conflict?

    hi guys

    i really dont understand where i am going wrong.I've read countless articles including http://blog.nemikor.co m/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

    Code:
    <head>
    <link href="/css/styles.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/ie6pngfix/iepngfix_tilebg.js"></script><!-- ie6 png fix -->
    <script type="text/javascript" src="/js/ddlevelsmenu.js"></script><!-- drop down menu js -->
    
    <script type="text/javascript" src="/js/jquery-1.4.4.min.js"></script><!-- slideshow jquery file 1 -->
    <script type="text/javascript" src="/js/slides.min.jquery.js"></script><!-- slideshow jquery file 2 -->
    <!-- slideshow jquery controls -->
    <script type="text/javascript">
    jQuery(function () {
    // Set starting slide to 1
    var startSlide = 1;
    // Get slide number if it exists
    if (window.location.hash) {
    startSlide = window.location.hash.replace('#', '');
    }
    // Initialize Slides
    jQuery('#slides').slides({
    preload: true,
    preloadImage: 'img/loading.gif',
    generatePagination: true,
    play: 5000,
    pause: 2500,
    slideSpeed: 1200,
    hoverPause: true,
    // Get the starting slide
    start: startSlide,
    animationComplete: function (current) {
    // Set the slide number as a hash
    // window.location.hash = '#' + current;
    }
    });
    });
    </script>
    <script type="text/javascript">
    var jQuery_1_4_4 = $.noConflict(true);
    </script>
    
    
    <script type="text/javascript" src="/js/prototype.js"></script><!-- lightbox aka image viewer js file 1 -->
    <script type="text/javascript" src="/js/scriptaculous.js?load=effects,builder"></script><!-- lightbox aka image viewer js file 2 -->
    <script type="text/javascript" src="/js/lightbox.js"></script><!-- lightbox aka image viewer js file 3 -->
    <script type="text/javascript">
    jQuery.noConflict();
    jQuery(document).ready(function(jQuery) {
    </script>
    
    <script type="text/javascript" src="/js/test/jquery.1-4-2.min.js"></script>
    <script type="text/javascript" src="/js/test/jquery.ie-select-width.js"></script>
    <!--[if lte ie 6]>
    <script type="text/javascript" src="/js/test/jquery.bgiframe.js"></script>
    <![endif]-->   
    <script type="text/javascript">
    $(function ()
    {
        // Set the width via the plugin.
        $('select#fixed-select-no-css').ieSelectWidth
        ({
            width : 200,
            containerClassName : 'select-container',
            overlayClassName : 'select-overlay'
        });
       
        // Set the width via CSS.
        $('select#fixed-select-css').ieSelectWidth
        ({
            containerClassName : 'select-container',
            overlayClassName : 'select-overlay'
        });
       
        // Borders and padding etc for Internet Explorer 6/7.
        $('select#select-styleable').ieSelectWidth
        ({
            containerClassName : 'select-container',
            overlayClassName : 'select-overlay'
        });
    });
    </script>
    <script type="text/javascript">
    var jQuery_1_4_2 = $.noConflict(true);
    </script>
    
    <!-- Share this button script -->
    <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>
    <script type="text/javascript" src="/js/showtab.js"></script>
    </head>
    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.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    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).

    Comment

    Working...