2016-05-16 36 views
0

我想知道如何复制在孤独星球所使用的相同模式窗口组件:http://www.lonelyplanet.com/interest/family-travel/best-of-family-travel/content/travel-tips-and-articles/2550如何使连接模式窗口

所以,当你点击上市的缩略图之一,你会看到模态窗口的箭头,悬停状态显示预览图像。我试图重新创建与Zurb基金会或简单的JS,jquery相同的插件,最终将实施到Wordpress中。我知道这不是提出这种问题的平台,而是。我不知道从哪里开始。

如果您有任何关于插件的建议,请随时告诉我。

在此先感谢!

+0

你在说什么缩略图?无法找到给定链接上的缩略图... –

回答

1

如果你想使用Zurb Foundation创建你自己的插件,你可以从下面的代码中获得一个想法。 http://codepen.io/shoaibik/pen/GZaOGV

$(function(){ 

    $("#exampleModal2").foundation('open'); 
    $('.nav').click(function(){ 
     if($(this).hasClass('prev')){ 
     if($(".reveal-overlay:visible").prev().find('.reveal').length){ 
      $(".reveal-overlay:visible").prev().find('.reveal').foundation('open'); 
     } else{ 
      $(".reveal-overlay:last").find('.reveal').foundation('open'); 
     } 
     }else{ 
     if($(".reveal-overlay:visible").next().find('.reveal').length){ 
      $(".reveal-overlay:visible").next().find('.reveal').foundation('open');  
     }else{ 
      $(".reveal-overlay:first").find('.reveal').foundation('open'); 
     } 
     }   
    }); 

}); 

如果你想使用插件,您可以用光滑滑块和定制,以您的需求。 http://kenwheeler.github.io/slick/

相关问题