
<?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 Archives - TECHNIG</title>
	<atom:link href="https://www.technig.com/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.technig.com/tag/jquery/</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 Archives - TECHNIG</title>
	<link>https://www.technig.com/tag/jquery/</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>
		<item>
		<title>How to Use FancyBox  jQuery Plugin?</title>
		<link>https://www.technig.com/use-fancybox-jquery-plugin/</link>
					<comments>https://www.technig.com/use-fancybox-jquery-plugin/#respond</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Thu, 19 May 2016 16:30:00 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript Framework]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Web Designing]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=7480</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>FancyBox is an amazing jQuery plugin that will let you open any image in the webpage like lightbox modal. When you click on the image, unlike opening on new tab or refreshing the page, it will open it in the same page with a nice modal dialog box. This tutorial will teach you how to [&#8230;]</p>
<p>The post <a href="https://www.technig.com/use-fancybox-jquery-plugin/">How to Use FancyBox  jQuery Plugin?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>FancyBox is an amazing jQuery plugin that will let you open any image in the webpage like lightbox modal. When you click on the image, unlike opening on new tab or refreshing the page, it will open it in the same page with a nice modal dialog box. This tutorial will teach you how to configure and use fancybox jquery plugin.</p>
<h2>Configurations</h2>
<p>For configuration, all you need is to download this plugin form <a href="http://fancyapps.com/fancybox/#license" target="_blank" rel="noopener noreferrer">fancyapps.com</a>. After you download the plugin, unzip the file, now you will see some files and folders inside. The folder we need is <em>source</em> folder. Copy that folder to your project. There are some helper files inside <em>helpers</em> folder that you might want to use, but they are optional. We are not going to use them.</p>
<h3>Include Fancybox to Your Project</h3>
<p>Inside source folder, you have one CSS file and two files for JavaScript. Simply, both JavaScript files  are the same, just the one which has suffix of pack.js is compress version for production. For testing, feel free to use either of them.</p>
<p>Now let&#8217;s create a html file with a simple template files.</p>
<pre class="theme:sublime-text lang:default decode:true">&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
	&lt;meta charset="UTF-8"&gt;
	&lt;title&gt;How to use Fancybox jquery plugin&lt;/title&gt;
	&lt;link rel="stylesheet" href="source/jquery.fancybox.css"&gt;
&lt;/head&gt;
&lt;body&gt;
	

	&lt;!-- images goes there --&gt;

	&lt;script src="source/jquery.js"&gt;&lt;/script&gt;
	&lt;script src="source/jquery.fancybox.js"&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>To use fancybox jquery plugin, you need to include jquery as well.</p>
<h2>How to Use fancybox jQuery plugin?</h2>
<p>Now you have configured the fancybox. It&#8217;s time to use fancybox jquery pluign and apply it on you images. Every image need to be in <em>&lt;a&gt;</em> tag, and the <em>href</em> attribute must refer to image image path. And one more thing, it must have a class, you can name it anything you wish.</p>
<pre class="theme:sublime-text lang:default decode:true ">	&lt;div class="gallery"&gt;
		&lt;a href="img/1.jpg" class="teching"&gt;
			&lt;img src="img/1.jpg" alt="first"&gt;
		&lt;/a&gt;
		&lt;a href="img/2.jpg" class="teching"&gt;
			&lt;img src="img/2.jpg" alt="first"&gt;
		&lt;/a&gt;
		&lt;a href="img/3.jpg" class="teching"&gt;
			&lt;img src="img/3.jpg" alt="first"&gt;
		&lt;/a&gt;
		&lt;a href="img/4.jpg" class="teching"&gt;
			&lt;img src="img/4.jpg" alt="first"&gt;
		&lt;/a&gt;
	&lt;/div&gt;
</pre>
<p>Apply a little style at top of the page to align them.</p>
<pre class="theme:sublime-text lang:css decode:true ">&lt;style&gt;
	.gallery{
		display: flex;
	}
	img{
		width: 100%;
		display: inline-block;
	}
&lt;/style&gt;</pre>
<p>Finally, at the bottom of the page add one line of jquery to apply the script to the images.</p>
<pre class="theme:sublime-text lang:js decode:true ">&lt;script&gt;
	$(".teching").fancybox();
&lt;/script&gt;</pre>
<p>It was that easy to use fancybox jquery plugin. It will apply to all elements that have the class of technig.</p>
<p>Here is live example.</p>
<p>[codepen_embed height=&#8221;539&#8243; theme_id=&#8221;dark&#8221; slug_hash=&#8221;VaJjvX&#8221; default_tab=&#8221;result&#8221; user=&#8221;Hujjat&#8221;]See the Pen &lt;a href=&#8217;http://codepen.io/Hujjat/pen/VaJjvX/&#8217;&gt;VaJjvX&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>
<h2>Conclusion</h2>
<p>It was all about how to use fancybox jquery plugin. If you have any questions or problem, feel free to comment it bellow. 🙂</p>
<p>The post <a href="https://www.technig.com/use-fancybox-jquery-plugin/">How to Use FancyBox  jQuery Plugin?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/use-fancybox-jquery-plugin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7480</post-id>	</item>
	</channel>
</rss>
