【问题标题】:Mobify carousel direction移动轮播方向
【发布时间】:2013-09-29 19:05:28
【问题描述】:

我正在使用 Mobify carousel 作为移动模板

将方向更改为 rtl 时,滑动无法正常工作。有什么解决办法吗?

【问题讨论】:

  • 为什么你做了direction rtl,试试text align right 因为这个carousel 只是为ltr 创建的。

标签: jquery mobile carousel mobify


【解决方案1】:

通过在下面的代码中改变左右来解决问题

if (dx > 0) {
self.prev();
} else {
self.next();
}

【讨论】:

    【解决方案2】:

    您是否考虑过使用 http://swipejs.com/ 代替 mobyfy,它具有开箱即用的左/右和右/左支持

    你需要开始的只是一些类似的东西

    <div id='slider' class='swipe'>
      <div class='swipe-wrap'>
        <div></div>
        <div></div>
        <div></div>
      </div>
    </div>
    
    window.mySwipe = new Swipe(document.getElementById('slider'), {
      startSlide: 2,
      speed: 400,
      auto: 3000,
      continuous: true,
      disableScroll: false,
      stopPropagation: false,
      callback: function(index, elem) {},
      transitionEnd: function(index, elem) {}
    });
    

    【讨论】:

    猜你喜欢
    • 2011-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-01
    • 2015-12-25
    • 2015-09-19
    • 1970-01-01
    相关资源
    最近更新 更多