Demo jqueryy ui

Size
2,534 Kb
Views
48,576

How do I make an demo jqueryy ui?

Sortable list with auto sorting and cloning. What is a demo jqueryy ui? How do you make a demo jqueryy ui? This script and codes were developed by Jonathan De Montalembert on 10 July 2022, Sunday.

Demo jqueryy ui Previews

Demo jqueryy ui - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>demo jqueryy ui</title> <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <ul id="sortable1" class="connectedSortable"> <li class="ui-state-default" data-order='1'>Item 1</li> <li class="ui-state-default" data-order='2'>Item 2</li> <li class="ui-state-default" data-order='3'>Item 3</li> <li class="ui-state-default" data-order='4'>Item 4</li> <li class="ui-state-default" data-order='5'>Item 5</li>
</ul>
<ul id="sortable2" class="connectedSortable">
</ul> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Demo jqueryy ui - Script Codes CSS Codes

body { background: silver;
}
.connectedSortable { background: white; padding: 20px; border: 1px solid black; display: inline-block; width: 49%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
.connectedSortable li { list-style: none; padding: 20px;
}

Demo jqueryy ui - Script Codes JS Codes

$(function() { $( "#sortable1" ).sortable({ connectWith: ".connectedSortable", remove: function(event, ui) { var $wrapper, $list, $item; // cache unsorted list $wrapper = $('#sortable2'); $item = ui.item; // clone the item before to use cache list ui.item.clone().appendTo('#sortable2'); // cache list $list = $wrapper.find('li'); // sort the list $list.sort(function(a,b) { // convert each value to integer and order DESC return +$(a).data('order') - +$(b).data('order'); }); //reinsert the list $list.each(function(){ $wrapper.append(this); }); // cancel the sortable to avoid default behavior $(this).sortable('cancel'); }, // make text unselectable }).disableSelection(); $('#sortable2').sortable({ stop: function(event, ui){ // disallow user to reorder the list $(this).sortable('cancel'); } }).disableSelection(); });
Demo jqueryy ui - Script Codes
Demo jqueryy ui - Script Codes
Home Page Home
Developer Jonathan De Montalembert
Username roine
Uploaded July 10, 2022
Rating 3
Size 2,534 Kb
Views 48,576
Do you need developer help for Demo jqueryy ui?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Jonathan De Montalembert (roine) Script Codes
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!