设为首页 - 加入收藏
广告 1000x90
您的当前位置:主页 > 特效 > 其他代码 > 正文

可拖动的360旋转预览jQuery插件

来源:未知 编辑:admin 时间: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 © 2021 众联设计之家

Power by DedeCms

Top