注册 登录 充值会员 退出
网站、APP、小程序等定制开发,联系QQ 1206995177 毕业设计 java源码 PHP源码
充值

jQuery水平垂直自由拖拽代码drag.js插件

作者/代码整理:  (源码已亲测,不会安装的可以向QQ1915635791要安装视频教程) 发布日期:2023-05-10
jQuery水平垂直自由拖拽代码drag.js插件
一款基于drag.js插件实现的支持水平拖拽,垂直拖拽,自由拖拽等特效的jQuery拖拽代码。


js代码

<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/drag.js"></script>

<script>
	$(function(){
		$('.box-1 dl').each(function(){
			$(this).dragging({
				move : 'x',
				randomPosition : true
			});
		});
		$('.box-2 dl').each(function(){
			$(this).dragging({
				move : 'y',
				randomPosition : true
			});
		});
		$('.box-3 dl').each(function(){
			$(this).dragging({
				move : 'both',
				randomPosition : false
			});
		});
		$('.box-4 dl').each(function(){
			$(this).dragging({
				move : 'both',
				randomPosition : true
			});
		});
		$('.box-5 dl').each(function(){
			$(this).dragging({
				move : 'both',
				randomPosition : true ,
				hander:'.hander'
			});
		});
	});
</script>