
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jQuery UI Archives - TECHNIG</title>
	<atom:link href="https://www.technig.com/tag/jquery-ui/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.technig.com/tag/jquery-ui/</link>
	<description>Gateway for IT Experts and Tech Geeks</description>
	<lastBuildDate>Wed, 01 Jun 2016 17:24:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://www.technig.com/wp-content/uploads/2020/04/32x32.png</url>
	<title>jQuery UI Archives - TECHNIG</title>
	<link>https://www.technig.com/tag/jquery-ui/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">162720667</site>	<item>
		<title>jQuery UI Sortable Drag and Drop</title>
		<link>https://www.technig.com/jquery-ui-sortable-drag-drop/</link>
					<comments>https://www.technig.com/jquery-ui-sortable-drag-drop/#respond</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Wed, 01 Jun 2016 17:24:03 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript Framework]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=7617</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>jQuery ui has an amazing plugin that will help you make drag and drop web application in a very easy and simple way. We will use jQuery ui sortable plugin to make a simple sortable drag and drop list. jQuery ui really made it easy to make an amazing drag and drop applications. Here is [&#8230;]</p>
<p>The post <a href="https://www.technig.com/jquery-ui-sortable-drag-drop/">jQuery UI Sortable Drag and Drop</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>jQuery ui has an amazing plugin that will help you make drag and drop web application in a very easy and simple way. We will use jQuery ui sortable plugin to make a simple sortable drag and drop list. jQuery ui really made it easy to make an amazing drag and drop applications. Here is what we are going to make from scratch.</p>
<p>[codepen_embed height=&#8221;357&#8243; theme_id=&#8221;dark&#8221; slug_hash=&#8221;RRNbbO&#8221; default_tab=&#8221;result&#8221; user=&#8221;Hujjat&#8221;]See the Pen &lt;a href=&#8217;http://codepen.io/Hujjat/pen/RRNbbO/&#8217;&gt;jQuery ui Sortabl plugin&lt;/a&gt; by Hujjat Nazari (&lt;a href=&#8217;http://codepen.io/Hujjat&#8217;&gt;@Hujjat&lt;/a&gt;) on &lt;a href=&#8217;http://codepen.io&#8217;&gt;CodePen&lt;/a&gt;.[/codepen_embed]</p>
<h1>How to Use jQuery UI Sortable?</h1>
<p>As like every other jQuery ui plugins, using sortable plugin is also the same and easy. All you need is to add jQuery and jQuery ui. You can download them from <a href="http://jquery.com/" target="_blank" rel="noopener noreferrer">jQuery </a>site.</p>
<p>Let&#8217;s add some html and css to start designing our sortable list. here the basic html markup(Of course you can customize it).</p>
<pre class="theme:sublime-text lang:default decode:true ">&lt;ul id="sortable"&gt;  
    &lt;li class="item-1"&gt;Item 1&lt;/li&gt;  
    &lt;li class="item-2"&gt;Item 2&lt;/li&gt;  
    &lt;li class="item-3"&gt;Item 3&lt;/li&gt;  
    &lt;li class="item-4"&gt;Item 4&lt;/li&gt;  
&lt;/ul&gt;</pre>
<p>and Here some CSS for styling.</p>
<pre class="theme:sublime-text lang:css decode:true ">@import url(https://fonts.googleapis.com/css?family=Lato);

body {
  margin: 0px;
  padding: 0px;
  background: #303030;
  font-family: 'Lato', sans-serif;
}

h1 {
  color: #fff;
  text-align: center;
  margin-top: 2em;
}

ul {
  list-style: none;
  margin-top: 2em;
}

ul li {
  color: #fff;
  padding: 20px;
  width: 500px;
  margin: 0px auto;
  cursor: pointer;
}

ul li.item-1 {
  background: #5BC0EB
}

ul li.item-2 {
  background: #9BC53D
}

ul li.item-3 {
  background: #E55934
}

ul li.item-4 {
  background: #FA7921
}
</pre>
<p>Coming to JavaScript part, it&#8217;s pretty simple. If you have not yet link to jQuery and jQuery ui, you can link them through cdn.</p>
<pre class="theme:sublime-text lang:js decode:true">&lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-rc1/jquery.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"&gt;&lt;/script&gt;</pre>
<p>I assume you have a added them at the bottom of your page. Now let&#8217;s write our JavaScript code to preform the action.</p>
<pre class="theme:sublime-text lang:js decode:true "> $(function() {
   $("#sortable").sortable();
 });</pre>
<p>We used jQuery to select the  sortable id and than we applied th sortable function to it. Now, our list will be sortable. We can change the order the way we want.</p>
<h2><strong>Conclusion</strong></h2>
<p>It was how jQuery ui sortable plugin works. You can use it in any project you want in the same way. We hope it has been informative for you. If you have any questions related to this content, feel free to comment it bellow. 🙂</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.technig.com/jquery-ui-sortable-drag-drop/">jQuery UI Sortable Drag and Drop</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/jquery-ui-sortable-drag-drop/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7617</post-id>	</item>
	</channel>
</rss>
