这里的js在哪里

发布于 2024-11-15 09:49:42 字数 1211 浏览 1 评论 0原文

我试图理解这里菜单背后的javascript http://www.canadastartup.com/。他们使用插件吗?有没有一个插件(最好是基于jquery的)可以产生类似的效果?

html 看起来像这样:

  <ul class="nav sf-js-enabled">
     <li><a href="">Home</a></li>
     <li class="page_item page-item-61 current_page_item selectedLava">
        <a title="" href="">About us</a>
     </li>
     <li class="page_item page-item-38"><a title="" href="">Marketing Services</a></li>
     <li class="page_item page-item-47"><a title="" href="">Sales Services</a></li>
     <li class="page_item page-item-31"><a title="" href="">Business Services</a></li>
     <li class="page_item page-item-67"><a title="" href="">Contact us</a></li>

     <li class="backLava" 
         style="left: 67px; top: 83px; width: 70px; height: 32px; overflow: hidden;">
       <div class="leftLava"></div>
       <div class="bottomLava"></div>
       <div class="cornerLava"></div>
     </li>
  </ul> <!-- end ul.nav -->

I'm trying to understand the javascript behind the menu here http://www.canadastartup.com/. Are they using a plugin? Is there a plugin (preferably jquery based) that can give a similar effect?

The html looks something like this:

  <ul class="nav sf-js-enabled">
     <li><a href="">Home</a></li>
     <li class="page_item page-item-61 current_page_item selectedLava">
        <a title="" href="">About us</a>
     </li>
     <li class="page_item page-item-38"><a title="" href="">Marketing Services</a></li>
     <li class="page_item page-item-47"><a title="" href="">Sales Services</a></li>
     <li class="page_item page-item-31"><a title="" href="">Business Services</a></li>
     <li class="page_item page-item-67"><a title="" href="">Contact us</a></li>

     <li class="backLava" 
         style="left: 67px; top: 83px; width: 70px; height: 32px; overflow: hidden;">
       <div class="leftLava"></div>
       <div class="bottomLava"></div>
       <div class="cornerLava"></div>
     </li>
  </ul> <!-- end ul.nav -->

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

小红帽 2024-11-22 09:49:42

看起来他们正在使用 superfish

jQuery('ul.nav').superfish({ 
    delay:       200,                            // one second delay on mouseout 
    animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
    speed:       'fast',                          // faster animation speed 
    autoArrows:  true,                           // disable generation of arrow mark-up 
    dropShadows: false                            // disable drop shadows 
});

虽然可能比看起来更多源代码第 162 行左右

looks like they are using superfish

jQuery('ul.nav').superfish({ 
    delay:       200,                            // one second delay on mouseout 
    animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
    speed:       'fast',                          // faster animation speed 
    autoArrows:  true,                           // disable generation of arrow mark-up 
    dropShadows: false                            // disable drop shadows 
});

though there may be more to it than that look around line 162 of source

你穿错了嫁妆 2024-11-22 09:49:42

I believe you are looking for the Lava Lamp:

http://www.canadastartup.com/wp-content/themes/TheProfessional/js/jquery.lavalamp.1.3.3-min.js


Although, if you want to learn how to do it yourself, a great video tutorial is the one on Net Tuts:

http://net.tutsplus.com/tutorials/html-css-techniques/how-to-build-a-lava-lamp-style-navigation-menu/

茶色山野 2024-11-22 09:49:42

为了创建您看到的动画,他们似乎使用 jQuery Lavalamp 插件

您可以在此处查看演示和教程

To create the animation you see, they seem to be using the jQuery Lavalamp plugin.

You can check out the Demos and Tutorials here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文