注册地址------登录地址
当前位置:主页 > 特效 > 其他代码 >

可拖动的360旋转预览jQuery插件
栏目分类:其他代码   发布日期:2015-09-02   浏览次数:

可拖动的360旋转预览jQuery插件
介绍
这是一款非常有意思的可拖动的360旋转预览jQuery插件,支持左右旋转,鼠标按下左键可以左右拖动旋转预览图片全部角度。

调用js文件
加入最新jQuery js文件和jquery.threesixty.js。这两个js文件。

html

  1. <div class="threesixty" data-path="assets/img/src/gem{index}.jpg" data-count="61">div> 

数据路径assets/img/src/gem{index}.jpg路径图像序列该指数被用来抓取的图像是基于01数据计数属性图像的数量

js

  1. $(document).ready(function(){ 
  2.     $('.threesixty').threeSixty({ 
  3.         dragDirection: 'horizontal'
  4.         useKeys: false 
  5.     }); 
  6. }); 

dragDirection : horizontal || vertical, horizontal is default.
useKeys : true || false, false is default
draggable : true || false, true is default

api

  1. $('.threesixty').nextFrame(); 
  1. $('.threesixty').prevFrame(); 


events

  1. $('.threesixty').on('down'function(){ // when user starts to drag }); 
  2. $('.threesixty').on('move'function(){ // as user is dragging }); 
  3. $('.threesixty').on('up'function(){ // when user finishes dragging}); 
Copyright © 2002-2011 摩臣2注册帐号 版权所有   粤ICP备00000000号-1   关于我们 | 广告合作 | 版权声明 | 意见反馈 | 联系方式 | 原创投稿 | 网站地图 |
特效 教程 资源 资讯