Heim > Web-Frontend > js-Tutorial > Hauptteil

Das jQuery-Drag-and-Drop-Sortier-Plug-in erzeugt einen Drag-and-Drop-Sortiereffekt (mit Quellcode-Download)_jquery

WBOY
Freigeben: 2016-05-16 15:14:20
Original
1402 Leute haben es durchsucht

Die Verwendung des Drag-Sorting-Plug-Ins von JQuery zum Erstellen eines Drag-Sortierungseffekts ist ein sehr praktisches Plug-In für das Maus-Drag-Layout. Das Rendering ist wie folgt:

Wirkungsdemonstration Quellcode-Download

HTML-Code:

<h1>水平拖拽</h1>
<div class="demo">
<div class="item item1"><span>1</span></div>
<div class="item item2"><span>2</span></div>
<div class="item item3"><span>3</span></div>
<div class="item item4"><span>4</span></div>
<div class="item item5"><span>5</span></div>
</div>
<script src="js/jquery-1.11.3.min.js"></script>
<script src="js/jquery.dad.min.js"></script>
<script>
$(function(){ 
$('.demo').dad();
});
</script>
<!-- 以下信息与演示无关,可不必理会 -->
<style>
body { margin: 0; border-left: 200px solid #ccc;}
h1 { width: 1000px; margin: 40px auto; font: 32px "Microsoft Yahei";}
.demo { width: 1000px; margin: 0 auto;}
.menu { position: absolute; left: 0; top: 0; bottom: 0; width: 200px; padding-top: 100px; font-family: Consolas,arial,"宋体"; background-color: #ccc;}
.menu a { display: block; height: 40px; margin: 0 0 1px 2px; padding-left: 10px; line-height: 40px; font-size: 14px; color: #333; text-decoration: none;}
.menu a:hover { background-color: #eee;}
.menu .cur { color: #000; background-color: #fff !important;}
.thead { width: 728px; height: 90px; margin: 0 auto; border-bottom: 40px solid transparent;}
</style>
<div class="menu">
<a class="cur" href="index.html">1、水平拖放</a>
<a href="index2.html">2、垂直拖放</a>
<a href="index3.html">3、多行拖放</a>
<a href="index4.html">4、指定拖动区域</a>
<a href="index5.html">5、回调函数</a>
<a href="index6.html">6、允许/禁止拖放</a>
<a href="index7.html">7、仿垃圾篓</a>
<a href="index8.html">8、仿购物车</a>
</div>
Nach dem Login kopieren

Das Obige ist das vom Editor eingeführte jQuery-Drag-and-Drop-Sortier-Plug-in zum Erstellen von Drag-and-Drop-Sortiereffekten (Download des Quellcodes im Anhang).

Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!