【问题标题】:next/prev links in horizontal animation page水平动画页面中的下一个/上一个链接
【发布时间】:2012-10-07 20:02:35
【问题描述】:

我在我的页面上做了类似的事情: http://manos.malihu.gr/tuts/horizontal-animate-page-to-id-jquery.html

除了我正在努力制作上一个/下一个按钮之外,它非常完美。我尝试了几种方法,但似乎不起作用,有人知道吗?

【问题讨论】:

    标签: jquery button next


    【解决方案1】:

    在我看来,最好的方法是增加锚点及其相关的内容选择器(例如 id: content-1/nav-1、content-2/nav-2 等)。您所有的导航项目都将具有.nav 的一般类,并且您所有的内容持有者将具有.content 的一般类。这样,您可以执行类似...

    $(" [next/previous button] ").click(function(){
       if ( $(this).attr("id") == "next" ) {
          [call function to ADD 1 to the current content/nav]
       } else if ( $(this).attr("id") == "previous" ) {
          [call function to SUBTRACT 1 from the current content/nav]
       }
    });
    

    【讨论】:

      猜你喜欢
      • 2020-01-27
      • 2020-04-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-26
      相关资源
      最近更新 更多