2013-12-12 126 views
0

我有一個不在我自己的網站上工作的滑塊,但是當我將它添加到JSFIDDLE時它工作正常!jQuery滑塊不在我的網站上工作,但在JSFIDDLE中工作?

我的網站:http://www.gymboss.net/gymboss-features.html#timerDetails

工作的jsfiddle:http://jsfiddle.net/t4H5L/3/

我無法解釋爲什麼。

$(window).load(function(){ 
     $("#sticker-nav").sticky({ topSpacing: 0, className:"hey" }); 

     $('ul.nav').localScroll(function(){ 

     }); 
    }); 

    $('#main-slider').liquidSlider(); 

    var d = $(".connect-gallery"), 
     e = function() { 
      var a = []; 
      return $.each(d.find("figure"), function (b, c) { 
       a.push(c.className.replace("-stage", "")) 
      }), a 
     }(), 
     f = 0, 
     g = function() { 
      var a = []; 
      return $.each(e, function (b, c) { 
       a.push(c + "-scene") 
      }), a 
     }().join(" "), 
     h = function (a) { 
      $(".connect-nav li").removeClass("selected").eq(a).addClass("selected"), d.removeClass(g).addClass(e[a] + "-scene"), f = a 
     }; 
    $(".connect-nav li").click(function() { 
     h($(this).data("index")) 
    }), $(".gallery-nav").click(function() { 
     var a = $(this).data("direction"), 
      b, c = f.length - 1; 
     a === "next" && (b = f < e.length - 1 ? f += 1 : 0), a === "previous" && (b = f > 0 ? f -= 1 : e.length - 1), h(b) 
    }), h(0) 
+0

帶GYM Boss設備的滑塊?這個對我有用。我使用Google Chrome。 – andre3wap

+0

嗯,不適合我在Chrome,FF,IE – user3063628

回答

0

看看控制檯。有三個錯誤需要解決(他們可能會或可能不會導致您的問題)。第一個當然看起來像罪魁禍首,並可能與noConflict以某種方式啓用有關。

Uncaught ReferenceError: jQuery is not defined jquery.liquid-slider-custom.min.js:6 
Uncaught TypeError: Object [object Object] has no method 'jcarousel' custom.js:21 
Uncaught TypeError: Object [object Object] has no method 'dispatchEvent' prototype.js:5734 
+0

我沒有看到鉻或FF的第一個錯誤 – user3063628

+0

嗯,它肯定是在那裏;)你會更好地使用[CDN](http:// cdnjs.com/)來加載jQuery和jCarousel。仍然在custom.js中看到'jcarousel'錯誤 - 看看你是否可以解決這個問題,你可能會很開心。 – brandonscript

+0

什麼更有趣的是緩存頁面有滑塊工作,但與jcarousel相同的錯誤:http://webcache.googleusercontent.com/search?q=cache:D7z5SeCxB-MJ:gator3058.hostgator.com/~flygary/gymboss- features.html +&cd = 1&hl = en&ct = clnk&gl = us&client = firefox-a – user3063628

相關問題