magnific-popup不是POPPING怀疑jQuery错误

时间:2015-11-05 10:28:15

标签: javascript jquery html

以下是页面:http://www.dbzdiesel.com/3-wheelers-parts.html

这是我的整个jQuery代码堆栈:

/* global $:false */

    (function(){

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

/ *主页soild功能动画 ==================================== * /

$(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+')')})

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

$(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插件 ================================= * /

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

/ * twitter插件 ================================== * /

$('#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 Feed ================================== * /

$(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: ''
  });
});

/ *页脚图标 ================================== * /

$('.head-icon').hover(function(){
    $(this).addClass('animated tada');
},function(){
    $(this).removeClass('animated tada');
});
});  
})
();

1 个答案:

答案 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});
});

也许您还没有包含浮动插件?