Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Jquery Conflict

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #173935
    bjsudipta
    Participant

    I have a critical problem in Javascript conflict.

    Please check my page here: http://webgraphicsexpert.com/calin/thankyou1-test.php

    Both Video Lightbox and bottom fadein fadeout text is not work together.

    Here is my code:

    MOD EDIT – Mega Codedump Removed

    Please let me know, How I will solve this probelm?

    #173949
    clokey2k
    Participant

    From what I can see, you are loading both MooTools and jQuery – this is adding complication.

    All of your show/hide scripts are referencing $ which is not running in jQuery because you are running it in noconflict() mode. Your code works with plain old jQuery – but the video/lightbox doesn’t. Go through your code and check which pieces of code is jQuery and MooTools.

    You may want to re-factor and put all of your code within a jQuery block like:

    jQuery.noConflict();
    (function( $ ) {
      $(document).ready(function(){
        $("Videobox").hide();
        var quotes = $(".quotes");
        quotes.hide();
    
        var quoteIndex = -1;
    
        function showNextQuote() {
          ++quoteIndex;
          quotes.eq(quoteIndex % quotes.length)
            .fadeIn(4000)
            .delay(15000)
            .fadeOut(4000, showNextQuote);
        }
    
        showNextQuote();
      })
        
    })(jQuery);
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.