【问题标题】:Is there any way to slide left and right in jQuery without using jQuery UI and jQuery Mobile [duplicate]有没有办法在不使用 jQuery UI 和 jQuery Mobile 的情况下在 jQuery 中左右滑动 [重复]
【发布时间】:2014-01-10 00:01:26
【问题描述】:

你能告诉我有什么方法可以在不使用 jQuery UI 和 jQuery Mobile 的情况下在 jQuery 中左右滑动。实际上有一种方法可以向上滑动和向下滑动。但是没有左右滑动?

【问题讨论】:

    标签: jquery


    【解决方案1】:

    查看http://jsfiddle.net/Jwkw6/1/

    $(function() 
    {  
        $('.specialist_pagecontent').eq(0).addClass("active").animate({ left : 0 }, 500);
        $('.specialist').click(function() {  
            $('.specialist_pagecontent').filter(".active").removeClass("active").stop(true).animate({ left : '-100%' }, 500); 
            $('.selected-specialist').removeClass('selected-specialist');
            $(this).addClass('selected-specialist');
            $('.specialist_pagecontent').eq($(this).index('.specialist')).addClass("active").stop(true).animate({ left : 0 }, 500);
        });  
    });
    

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-09-03
      • 1970-01-01
      • 2013-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-29
      • 1970-01-01
      相关资源
      最近更新 更多