2015-11-05 67 views
0

這裏的頁面:http://www.dbzdiesel.com/3-wheelers-parts.html蕩氣迴腸 - 彈出不彈出懷疑jQuery的錯誤

這裏是我的整個jQuery代碼堆棧:

/* global $:false */ 

    (function(){ 

"use strict"; 
    $(window).load(function(){ 
    $("#nav-sticky").sticky({ topSpacing: 0 }); 
    }); 

/*主頁測定土壤特點動畫 ======== ============================ */

$(window).scroll(function(){ // scroll event 
    var windowTop = $(window).scrollTop(), // returns number 
     solid_action = $('.solid-visuals').offset().top-500; 
    if (windowTop >= solid_action) 
    { 
     $('.solid-iphone,.solid-imac').addClass('animated fadeInUp'); 
    } 
}); 

/*平滑滾動 ======== ========================== */

$(document).ready(function() { 
    $("body").niceScroll({ 
     touchbehavior:false, 
     cursorcolor:"#000", 
     cursoropacitymax:1, 
     cursorwidth:8, 
     background:"#333", 
     autohidemode:true 
    }); 
}); 

$(function(){var  nice=$(":nicescroll").getNiceScroll(0);$("#div1").html($("#div1").html()+' '+nice.version+' ($:'+$().jquery+')')}) 

/*浮 ================================= */

$(function() { 
    $('#social_side .contents').floater({animate: true, animation_duration:1000, vertical_offset: 0, scroll_trigger: 120}); 
}); 

/*主頁展示的JavaScript ================================= */

$(function(){ 

    $(window).on("resize", function() { 

    var etwrapper_height= $('.show-case-visual img').height(); 
    $('.et-wrapper').height(etwrapper_height); 

    var etwrapper_basic_height= $('.folio-visual').height(); 
    $('.et-wrapper-basic').height(etwrapper_basic_height+100); 

    var showcase_hover= $('.show-case-visual img').width(); 

    $('.show-case-visual').width(showcase_hover); 
    $('.showcase-hover').width(showcase_hover-5); 

    var $container = $('.masonry-container'); 
    $container.masonry({ 
     itemSelector: '.post-unit' 
    }); 

    }).resize(); 

/*閃爍插件 ================================= */

$('.flicker').jflickrfeed({ 
    limit: 9, 
    qstrings: { 
     id: '[email protected]' 
    }, 
    itemTemplate: '<li><a href="{{image_b}}"><img alt="{{title}}" src="{{image_s}}" /></a></li>' 
}); 

/*嘰嘰喳喳插件 ================================== */

$('#tweets').tweetable({ 
    /*add your username below*/ 
    username: 'dbzdieselparts', 
    time: true, 
    rotate: true, 
    speed: 4000, 
    limit: 4, 
    replies: false, 
    position: 'append', 
    loading: 'loading...' , 
    failed: "Sorry, our twitter feed cannot be loaded right now. You can find us directly on Twitter @dbzdieselparts", 
    html5: true 
}); 

/*告別賽滑塊 =================================== */

$('.testi-inner').flexslider({ 
    animation: "slide", 
    directionNav: false, 
    controlNav: true, 
    pauseOnHover: true, 
    slideshow: false, 
    direction: "horizontal" //Direction of slides 
}); 

/* Flex的博客滑塊 =================================== */

$('.blog-slider').flexslider({ 
    animation: "slide", 
    controlNav: false 
}); 

/* Flex的滑塊 =================================== */

$('.flexslider').flexslider({ 
    animation: "slide" 
}); 

/*燈箱 ================================== */

$(document).ready(function() { 
    $('.image-link').magnificPopup({type:'image'}); 
}); 

/* Facebook的飼料 ================================== */

$(document).ready(function() { 
$('#news_box_img_mode').lc_news_box({ 
    height: 260, 
    min_horiz_w: 10, 
    max_news: 24, 
    news_per_time: 3, 
    read_more_txt: '[read more...]', 
    img_behavior: 'expand', 
    read_more_btn: true, 
    theme: 'dark', 
    nav_arrows: 'side', 
    social_share: true, 
    layout: 'horizontal', 
    boxed_news: true, 
    carousel: true, 
    expandable_news: true, 
    horiz_img_mode: true, 
    autoplay: true, 
    slide_all: true, 
    slideshow_time: 5000, 
    animation_time: 1200, 

    src : [ 
      { 
       type: 'facebook', 
       id: '394096404020062', 
       link_target: '_blank' 
      } 
      ] 
     }); 
}); 

/* TinyNav ====================== ============ */

$(function() { 
    $('#nav').tinyNav({ 
    active: 'selected', 
    indent: '→ ', 
    header: '', 
    label: '' 
    }); 
}); 

/*頁腳圖標 ======================== ========== */

+0

實際問題是什麼?你能看到控制檯中的任何錯誤嗎?目前還不清楚你問的是什麼問題。 –

+0

如果您轉到頁面,我有 http://www.dbzdiesel.com/3-wheelers-parts.html 上的錯誤,然後單擊放大鏡圖標,您會看到圖像打開同一個窗口,而不是燈箱。這是問題......我不知道從哪裏開始尋找問題。 –

+0

燈箱在任何頁面上突然不起作用。我有一位朋友在畫廊/產品頁面上做了一些更新,從那以後它就不起作用了。感謝您的快速答覆! –

回答

0

頁面上有一個JS錯誤,可能先修復它?我認爲它阻止了magnificPopup js。

Uncaught TypeError: $(...).floater is not a function 

本功能的造成錯誤:

/* Floater =================================*/ 

$(function() { 
    $('#social_side .contents').floater({animate: true, animation_duration:1000, vertical_offset: 0, scroll_trigger: 120}); 
}); 

也許你不包括浮動插件?

+0

還有一個問題傑克....因爲你是這裏的人......你如何以及在哪裏檢查並看到「未捕獲的錯誤」(軟件,腳本?) –

+0

@JPGreeff您可以在Chrome中使用開發人員工具:https: //developer.chrome.com/devtools/docs/console或Firefox:https://developer.mozilla.org/en-US/docs/Tools/Web_Console – Jack