<?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>Design Gala &#187; jQuery</title>
	<atom:link href="http://designgala.com/topics/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://designgala.com</link>
	<description>Web Usability, Web Technology, User Experience</description>
	<lastBuildDate>Wed, 02 May 2012 03:55:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Rotating DIV block using jQuery</title>
		<link>http://designgala.com/rotating-div-block-using-jquery/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rotating-div-block-using-jquery</link>
		<comments>http://designgala.com/rotating-div-block-using-jquery/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 08:02:36 +0000</pubDate>
		<dc:creator>Design Gala</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://designgala.com/?p=2611</guid>
		<description><![CDATA[I have taken this article from csstricks.com and is written by By Chris Coyier . Sometimes we need to give an interactive look to a webpage and this could be one of the...]]></description>
			<content:encoded><![CDATA[<p><img src="http://designgala.com/wp-content/uploads/2011/02/rotating-div.png" alt="" title="rotating div" width="1002" height="509" class="alignnone size-full wp-image-2613" /><br />
I have taken this article from <a href="http://css-tricks.com/rotating-feature-boxes/">csstricks.com</a> and is written by By Chris Coyier . Sometimes we need to give an interactive look to a webpage and this could be one of the good option for that. If you have a simple idea about the html,CSS and jquery ,then you can use this features in your webpage. </p>
<p>To use the rotating div block in your webpage you have to follow three steps</p>
<p>1. HTML Section<br />
2. CSS Section<br />
3. jQuery Section </p>
<p><a href="http://css-tricks.com/examples/RotatingBlocks.zip" target=" ">Click here</a> to download the demo file.</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/rotating-div-block-using-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Five Cool jQuery Plugins for Displaying Images</title>
		<link>http://designgala.com/five-cool-jquery-plugins-for-displaying-images/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=five-cool-jquery-plugins-for-displaying-images</link>
		<comments>http://designgala.com/five-cool-jquery-plugins-for-displaying-images/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 08:00:46 +0000</pubDate>
		<dc:creator>Design Gala</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://designgala.com/?p=2591</guid>
		<description><![CDATA[Write less , do more. the slogan of the jquery proves its significance. According to jquery.com .&#8221;jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and...]]></description>
			<content:encoded><![CDATA[<p><img src="http://designgala.com/wp-content/uploads/2011/01/pjhoto.jpg" alt="" title="pjhoto" width="510" height="400" class="alignnone size-full wp-image-2593" /></p>
<p>Write less , do more. the slogan of the jquery proves its significance. According to jquery.com .&#8221;jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.&#8221;  I am always fascinated by the jquery plugins.In this article , i have compiled  some jquery plugins which i have used in my projects and hope it will be useful to other&#8217;s too.The jquery plugins, here i am discussing are specially focused for handling the images.</p>
<p><a href="http://css-tricks.com/creating-a-slick-auto-playing-featured-content-slider/" target=" "><strong>1.Slick Auto-Playing Featured Content Slider</strong></a></p>
<p><a href="http://css-tricks.com/creating-a-slick-auto-playing-featured-content-slider/" target=" "><img src="http://designgala.com/wp-content/uploads/2011/01/css-tricks.png" alt="" title="css tricks" width="496" height="399" class="alignnone size-full wp-image-2597" /></a></p>
<p><strong><a href="http://css-tricks.com/examples/FeaturedContentSlider/" target=" ">Click here</a></strong> for demo and download.</p>
<p><strong><a href="http://buildinternet.com/2009/03/sliding-boxes-and-captions-with-jquery/" target=" ">2.Sliding Boxes and Captions with jQuery</a></strong></p>
<p><a href="http://buildinternet.com/2009/03/sliding-boxes-and-captions-with-jquery/"><img src="http://designgala.com/wp-content/uploads/2011/01/build-internet.png" alt="" title="build internet" width="699" height="562" class="alignnone size-full wp-image-2600" /></a></p>
<p><strong><a href="http://buildinternet.com/2009/03/sliding-boxes-and-captions-with-jquery/" target=" ">Click here</a></strong> for demo and download. </p>
<p><strong><a href="http://workshop.rs/2009/12/image-gallery-with-fancy-transitions-effects/"target=" ">3.jqFancyTransitions slideshow with strip effects</a></strong></p>
<p><a href="http://workshop.rs/2009/12/image-gallery-with-fancy-transitions-effects/"><img src="http://designgala.com/wp-content/uploads/2011/01/jqfancy.png" alt="" title="jqfancy" width="533" height="385" class="alignnone size-full wp-image-2603" /></a></p>
<p><strong><a href="http://workshop.rs/2009/12/image-gallery-with-fancy-transitions-effects/" target=" ">Click here</a></strong> for demo and download. </p>
<p><strong><a href="http://addyosmani.com/blog/zoomer-gallery-a-jquery-plugin-for-displaying-images-with-flash-like-zooming-effects/" target=" ">4.zoomer gallery</a></strong></p>
<p><a href="http://addyosmani.com/blog/zoomer-gallery-a-jquery-plugin-for-displaying-images-with-flash-like-zooming-effects/"><img src="http://designgala.com/wp-content/uploads/2011/01/zoomergallery.png" alt="" title="zoomergallery" width="719" height="497" class="alignnone size-full wp-image-2604" /></a></p>
<p><strong><a href="http://addyosmani.com/blog/zoomer-gallery-a-jquery-plugin-for-displaying-images-with-flash-like-zooming-effects/" target=" ">Click here</a></strong> for demo and download. </p>
<p><a href="http://buildinternet.com/2010/02/animate-panning-slideshow-with-jquery/" target=" "><strong>5.Panning Slideshow</strong></a></p>
<p><a href="http://buildinternet.com/2010/02/animate-panning-slideshow-with-jquery/" target=" "><img src="http://designgala.com/wp-content/uploads/2011/01/panning-slideshow.png" alt="" title="panning slideshow" width="972" height="565" class="alignnone size-full wp-image-2605" /></a></p>
<p><strong><a href="http://buildinternet.com/2010/02/animate-panning-slideshow-with-jquery/" target=" ">Click here</a></strong> for demo and download. </p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/five-cool-jquery-plugins-for-displaying-images/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Floating Message Box Using Jquery</title>
		<link>http://designgala.com/floating-message-box-using-jquery/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=floating-message-box-using-jquery</link>
		<comments>http://designgala.com/floating-message-box-using-jquery/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 04:45:30 +0000</pubDate>
		<dc:creator>Rabi Shrestha</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[floating message box]]></category>
		<category><![CDATA[floating message box using jquery]]></category>
		<category><![CDATA[message box]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=2383</guid>
		<description><![CDATA[Sometimes, we have to show some extra message in our post which are important and linked with the post and cannot put that in the webpage like some important announcement and breaking news...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.designgala.com/wp-content/uploads/2010/07/iceberg2.jpg"><img src="http://www.designgala.com/wp-content/uploads/2010/07/iceberg2.jpg" alt="" title="iceberg2" width="519" height="270" class="alignnone size-full wp-image-2386" /></a><br />
Sometimes, we have to show some extra message in our post which are important and linked with the  post and cannot put that in the webpage  like some important announcement  and breaking news etc. In these cases, it can better  option  to use a Floating Message Box which will appear in front of the webpage .  Today, I am going to discuss the code which will create a floating message box using jquery . You can use this code everywhere you want .<span id="more-2383"></span></p>
<p><strong>Step 1</strong>:<br />
Copy and paste the following code on the head section of your webpage .</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;
&lt;script language=&quot;javascript&quot; src=&quot;jquery.js&quot;&gt;&lt;/script&gt;
&lt;script language=&quot;javascript&quot; src=&quot;jquery.dimensions.js&quot;&gt;&lt;/script&gt;
<span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript&quot;</span><span style="color: #339933;">&gt;</span>
	<span style="color: #003366; font-weight: bold;">var</span> <span style="color: #000066;">name</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;#floatMess&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> menuYloc <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	menuYloc <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;top&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;top&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;px&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			$<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				offset <span style="color: #339933;">=</span> menuYloc<span style="color: #339933;">+</span>$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">scrollTop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;px&quot;</span><span style="color: #339933;">;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>top<span style="color: #339933;">:</span>offset<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span>duration<span style="color: #339933;">:</span><span style="color: #CC0000;">500</span><span style="color: #339933;">,</span>queue<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#close_message'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
  			$<span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> top<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;+=15px&quot;</span><span style="color: #339933;">,</span>opacity<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre>
</div>
</div>
<p><strong>Step 2</strong>:<br />
Add the following code in the CSS style sheet or  in the style section of html page.</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">#floatMess <span style="color: #009900;">&#123;</span>
		position<span style="color: #339933;">:</span>absolute<span style="color: #339933;">;</span>
		top<span style="color: #339933;">:</span>5px<span style="color: #339933;">;</span>
		float<span style="color: #339933;">:</span>left<span style="color: #339933;">;</span>
		width<span style="color: #339933;">:</span><span style="color: #CC0000;">95</span><span style="color: #339933;">%;</span>
		border<span style="color: #339933;">:</span>1px solid #<span style="color: #CC0000;">999</span><span style="color: #339933;">;</span>
		background<span style="color: #339933;">-</span>color<span style="color: #339933;">:</span>#<span style="color: #CC0000;">456</span><span style="color: #339933;">;</span>
		color<span style="color: #339933;">:</span>#ccc<span style="color: #339933;">;</span>
		padding<span style="color: #339933;">:</span>5px 5px 5px 25px<span style="color: #339933;">;</span>
		text<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span>center<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p> The above codes select the color,size font color, width etc of the floating message box.<br />
You can change the upper parameters as per your requirements.</p>
<p><strong>Step 3</strong>:<br />
 Now it’s the time for adding the main thing in the body section of your webpage ie the main message DIV which is going to be displayed on the webpage. Copy the following codes and paste it in the beginning of the body section or anywhere , it will not affect the other div of the page .</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;floatMess&quot;</span><span style="color: #339933;">&gt;&lt;</span>img id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;close_message&quot;</span> style<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;float:right;cursor:pointer&quot;</span>  src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;cross.png&quot;</span> <span style="color: #339933;">/&gt;</span>
      Your message Goes here
 <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre>
</div>
</div>
<p><strong>Step 4</strong>:<br />
You will need to download  following three files and save it in the same folder which contains the main html file.</p>
<ul>
<li>jquery.js</li>
<li>jquery.dimensions.js</li>
<li>cross.png  ( ICON need to display cross image  at the message box )</li>
</ul>
<p><strong>Downloads:</strong></p>
<ul>
<li><a href="http://www.designgala.com/demos/floatmessage/jquery.js" target=" "><strong>Click here</strong></a> to download jquery.js</li>
<li><a href="http://www.designgala.com/demos/floatmessage/jquery.dimensions.js" target=" "><strong>Click here</strong></a> to download jquery.dimensions.js</li>
<li><a href="http://www.designgala.com/demos/floatmessage/cross.png" target=" "><strong>Click here</strong></a> to download cross.png</li>
</ul>
<p><strong>DEMO</strong></p>
<ul>
<li><a href="http://www.designgala.com/demos/floatmessage/message.html" target=" "><strong>Click here</strong></a>  to see DEMO </li>
<li><a href="http://www.designgala.com/demos/floatmessage/demo.rar" target=" "><strong>Click here</strong></a> to download the zip version of demo file .</li>
</ul>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/floating-message-box-using-jquery/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Basic jQuery Tutorial: About parent and child elements</title>
		<link>http://designgala.com/basic-jquery-tutorial-about-parent-and-child-elements/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=basic-jquery-tutorial-about-parent-and-child-elements</link>
		<comments>http://designgala.com/basic-jquery-tutorial-about-parent-and-child-elements/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 12:34:59 +0000</pubDate>
		<dc:creator>Mukesh Chapagain</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[elements]]></category>
		<category><![CDATA[parent]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=2006</guid>
		<description><![CDATA[In this article, I will be explaining about parent and child elements and how to use jQuery to them efficiently. VIEW DEMO Basically, parent element means any HTML element with other elements inside...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.designgala.com/wp-content/uploads/2010/02/jquery-logo.png"><img src="http://www.designgala.com/wp-content/uploads/2010/02/jquery-logo.png" alt="" width="268" height="268" class="alignleft size-full wp-image-2007" /></a></p>
<p>In this article, I will be explaining about parent and child elements and how to use jQuery to them efficiently.<br />
<a href="http://www.cssbreak.com/examples/parent-child-elements/"><br />
VIEW DEMO</a> </p>
<p>Basically, parent element means any HTML element with other elements inside it. Like in the following HTML code, we have the div &#8216;parent&#8217;. We suppose it to be parent element. There are other elements inside it like ul, li, and span. So, ul, li and span are children of the div &#8216;parent&#8217;. There is also nested ul and li, hence containing parent child combination.<span id="more-2006"></span></p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;div&gt;
	Hover the box and LINK! &lt;br /&gt;&lt;br /&gt;
	&lt;ul&gt;
		&lt;li&gt;LINK 1
			&lt;ul&gt;
				&lt;li&gt;Sub link 1&lt;/li&gt;
				&lt;li&gt;Sub link 2&lt;/li&gt;
				&lt;li&gt;Sub link 3&lt;/li&gt;
			&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;LINK 2
			&lt;ul&gt;
				&lt;li&gt;Sub link 1&lt;/li&gt;
				&lt;li&gt;Sub link 2&lt;/li&gt;
			&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;br /&gt;
	&lt;span&gt;Sample text One!&lt;/span&gt; &lt;br /&gt;
	&lt;span&gt;Sample text Two!&lt;/span&gt; &lt;br /&gt;
	&lt;span&gt;Sample text Three!&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;</pre>
</div>
</div>
<p>The following jQuery code will change the CSS of all span inside the div with id &#8216;parent&#8217; when we hover the mouse over the div.</p>
<p>jQuery(&#8216;parent &gt; child&#8217;) description: Selects all direct child elements specified by &#8220;child&#8221; of elements specified by &#8220;parent&#8221;.</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#parent&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#parent &amp;gt; span&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;color&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;green&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;font-size&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;20px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#parent &amp;gt; span&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeAttr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;style&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>The following jQuery code will change the CSS of the parent of li inside the div with id &#8216;parent&#8217; when we hover the mouse over the li element of the div.</p>
<p>More clearly explaining:<br />
- when mouse is hovered on the li element of the div with id &#8216;parent&#8217;<br />
- then the CSS of the parent of the particular li element is change (not of the li element but of the parent of the li element)<br />
- when the mouse is moved away from the li element, then the recently added css is removed and we go back to normal<br />
- parent() function description: Get the parent of each element in the current set of matched elements.</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#parent li&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;border&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;1px solid red&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeAttr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;style&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p><a href="http://www.cssbreak.com/examples/parent-child-elements/"><br />
VIEW DEMO</a> </p>
<p>Cheers,</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/basic-jquery-tutorial-about-parent-and-child-elements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Basic jQuery Tutorial: Write or Append content to DIV</title>
		<link>http://designgala.com/basic-jquery-tutorial-write-or-append-content-to-div/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=basic-jquery-tutorial-write-or-append-content-to-div</link>
		<comments>http://designgala.com/basic-jquery-tutorial-write-or-append-content-to-div/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 16:00:29 +0000</pubDate>
		<dc:creator>Mukesh Chapagain</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=2013</guid>
		<description><![CDATA[In this article, I will be showing you how to write or append content to DIV. When you write, all the text present before will be replaced by new content. When you append,...]]></description>
			<content:encoded><![CDATA[<p>In this article, I will be showing you how to write or append content to DIV. When you write, all the text present before will be replaced by new content. When you append, new content will be added after the previous content already present there.</p>
<p><a href="http://www.cssbreak.com/examples/write-append-content/"><br />
VIEW DEMO</a> </p>
<p><span id="more-2013"></span></p>
<p><img src="http://www.designgala.com/wp-content/uploads/2010/02/jquery-logo.png" alt="" width="268" height="268" class="alignleft size-full wp-image-2007" /> Here is my html code. This contains a div with class &#8216;content&#8217; and two buttons (Write and Append).</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;div class=&quot;content&quot;&gt;
	Write Something!
&lt;/div&gt;
&lt;br /&gt;
&nbsp;
&lt;button&gt;Write&lt;/button&gt;
&lt;button&gt;Append&lt;/button&gt;</pre>
</div>
</div>
<p>Here is the jQuery code to write data:</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#write&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello World! &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>Here is the jQuery code to append data:</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#append&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello World! &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p><a href="http://www.cssbreak.com/examples/write-append-content/"><br />
VIEW DEMO</a></p>
<p>Cheers,</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/basic-jquery-tutorial-write-or-append-content-to-div/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Basic jQuery Tutorial: Add Remove Attribute</title>
		<link>http://designgala.com/basic-jquery-tutorial-add-remove-attribute/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=basic-jquery-tutorial-add-remove-attribute</link>
		<comments>http://designgala.com/basic-jquery-tutorial-add-remove-attribute/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 14:10:16 +0000</pubDate>
		<dc:creator>Mukesh Chapagain</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=2018</guid>
		<description><![CDATA[In this article, I will be showing you how to add or remove HTML attributes. HTML attributes like title, href, src, etc. For example:- &#60;img src=&#34;abc.jpg&#34; class=&#34;test&#34; alt=&#34;abc&#34; /&#62; Here: src, class, alt,...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.designgala.com/wp-content/uploads/2010/02/jquery-logo.png"><img src="http://www.designgala.com/wp-content/uploads/2010/02/jquery-logo.png" alt="" width="268" height="268" class="alignleft size-full wp-image-2007" /></a></p>
<p>In this article, I will be showing you how to add or remove HTML attributes. HTML attributes like title, href, src, etc. For example:-</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;img src=&quot;abc.jpg&quot; class=&quot;test&quot; alt=&quot;abc&quot; /&gt;</pre>
</div>
</div>
<p>Here: src, class, alt, title are attributes. </p>
<p>You can add attributes like above through jQuery. You can also remove the attributes with jQuery. <span id="more-2018"></span></p>
<p><a href="http://www.cssbreak.com/examples/add-remove-attribute/">VIEW DEMO</a> </p>
<p>Here is the HTML source. This contains a link with id &#8216;myLink&#8217; and Add and Remove buttons with id &#8216;add&#8217; and &#8216;remove&#8217; respectively.</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>div <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;content&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>a id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;myLink&quot;</span> href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">&gt;</span>This <span style="color: #000066; font-weight: bold;">is</span> my LINK<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>button<span style="color: #339933;">&gt;</span>Add<span style="color: #339933;">&lt;/</span>button<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>button<span style="color: #339933;">&gt;</span>Remove<span style="color: #339933;">&lt;/</span>button<span style="color: #339933;">&gt;</span></pre>
</div>
</div>
<p><strong>Adding Attribute</strong></p>
<p>The following function works as follows:<br />
- myLink is the id of a href link<br />
- add is the id of add button<br />
- when add button is clicked, some style (css) is added to the link with id &#8216;myLink&#8217;<br />
- after that, &#8216;title&#8217; attribute is added to link with id &#8216;myLink&#8217;</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#add&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myLink&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;font-weight&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;bold&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;color&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;red&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;text-decoration&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;line-through&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myLink&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;My Link Title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p><strong>Removing Attribute</strong></p>
<p>The following function works as follows:<br />
- there is a button with id &#8216;remove&#8217;<br />
- when remove button is clicked, the following things happen:<br />
	- &#8216;style&#8217; attribute is removed from the link with id &#8216;myLink&#8217;<br />
	- &#8216;title&#8217; attribute is removed from the link with id &#8216;myLink&#8217;</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#remove&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myLink&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeAttr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;style&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myLink&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeAttr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p><a href="http://www.cssbreak.com/examples/add-remove-attribute/">VIEW DEMO</a></p>
<p>Cheers,</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/basic-jquery-tutorial-add-remove-attribute/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Basic jQuery Tutorial: Change CSS</title>
		<link>http://designgala.com/basic-jquery-tutorial-change-css/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=basic-jquery-tutorial-change-css</link>
		<comments>http://designgala.com/basic-jquery-tutorial-change-css/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 15:34:10 +0000</pubDate>
		<dc:creator>Mukesh Chapagain</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[class]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=2011</guid>
		<description><![CDATA[In this article, I will be showing you how to add or change css styling. You will be able to add or remove class in HTML elements. VIEW DEMO Here is my html...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.designgala.com/wp-content/uploads/2010/02/jquery-logo.png" alt="" width="268" height="268" class="alignleft size-full wp-image-2007" /></p>
<p>In this article, I will be showing you how to add or change css styling. You will be able to add or remove class in HTML elements. </p>
<p><a href="http://www.cssbreak.com/examples/change-css/">VIEW DEMO</a> </p>
<p><span id="more-2011"></span></p>
<p>Here is my html code:</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;div&gt;
	&lt;span&gt;Sample text!&lt;/span&gt;
	&lt;br /&gt;
	Testing!
&lt;/div&gt;
&lt;br /&gt;
&nbsp;
&lt;div&gt;Click me&lt;/div&gt;</pre>
</div>
</div>
<p>As you can see above, I have a div with id &#8216;content&#8217;. I have &#8216;Sample text!&#8217; inside span. And I have a div with id &#8216;clickme&#8217;. </p>
<p>Here is CSS class to be used:</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.hover</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#003399</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p>Here is the magical jQuery function :)</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#clickme&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;hover&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;hover&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>Here, &#8216;hover&#8217; function is used. It means that, when we hover on &#8216;Click me&#8217; div then the CSS class &#8216;hover&#8217; is added to the &#8216;clickme&#8217; div. The &#8216;hover&#8217; class will change the color, font-weight, etc. of the div text &#8216;Click me&#8217;.</p>
<p>Now, when we click the &#8216;Click me&#8217; text, then the CSS styling is added to the div &#8216;content&#8217;. The new styling will change the text of div &#8216;content&#8217; to green in color and it also increases the font size. The following jQuery code is used:</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#clickme&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;color&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;green&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;font-size&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;20px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p><a href="http://www.cssbreak.com/examples/change-css/">VIEW DEMO</a> </p>
<p>Cheers,</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/basic-jquery-tutorial-change-css/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Basic jQuery Tutorial: Animate div and image</title>
		<link>http://designgala.com/basic-jquery-tutorial-animate-div-and-image/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=basic-jquery-tutorial-animate-div-and-image</link>
		<comments>http://designgala.com/basic-jquery-tutorial-animate-div-and-image/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 14:41:35 +0000</pubDate>
		<dc:creator>Mukesh Chapagain</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[animate]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=2015</guid>
		<description><![CDATA[In this article, I will be showing you how to animate image and div. By animation, I just mean basic animation. This is a basic tutorial. So, please don&#8217;t expect it to be...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.designgala.com/wp-content/uploads/2010/02/jquery-logo.png" alt="" width="268" height="268" class="alignleft size-full wp-image-2007" /></p>
<p>In this article, I will be showing you how to animate image and div. </p>
<p>By animation, I just mean basic animation. This is a basic tutorial. So, please don&#8217;t expect it to be so complex animation :). It will simply be increasing the width of the image and div with animate effect.</p>
<p><span id="more-2015"></span></p>
<p>This is a base for starting animation with jQuery.<br />
<a href="http://www.cssbreak.com/examples/animate/"><br />
VIEW DEMO</a> </p>
<p>Here we go.</p>
<p>I have the following HTML tags for image and buttons:</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;img src=&quot;lilies.jpg&quot; /&gt;
&lt;br /&gt;&lt;br /&gt;
&nbsp;
&lt;button&gt;Large&lt;/button&gt;
&lt;button&gt;Small&lt;/button&gt;</pre>
</div>
</div>
<p>Here is the jQuery code to animated the image:</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#large&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#img&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;30%&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#small&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#img&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;200px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>In the above code:</p>
<p>- When the &#8216;Large&#8217; button is clicked, the image size is increased by 30% with a speed of 1500 ms. The first parameter in the animate() function is CSS property and the second parameter is the number determining how long the animation will run.</p>
<p>- When the &#8216;Small&#8217; button is clicked, the image size is fixed to be 200px. 1500 is the time for the animation to ru in millisecond.</p>
<p><strong>Similarly, for DIV.</strong></p>
<p>Here is the HTML code with div and buttons:</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;div class=&quot;content&quot;&gt;
	My Div
&lt;/div&gt;
&lt;br /&gt;
&nbsp;
&lt;button&gt;Large&lt;/button&gt;
&lt;button&gt;Small&lt;/button&gt;</pre>
</div>
</div>
<p>Here is the jQuery code to animated the div:</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#large2&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;50%&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#small2&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;300px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>- When the &#8216;Large&#8217; button is clicked, the div is expanded to 50% of its width.<br />
- When the &#8216;Small&#8217; button is clicked, the div is fixed to 300px of width.<br />
- 1500 is the time for the animation to run. You can change it according to you need and wish.<br />
<a href="http://www.cssbreak.com/examples/animate/"><br />
VIEW DEMO</a> </p>
<p>Cheers,</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/basic-jquery-tutorial-animate-div-and-image/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>jQuery: Create Stunning Slideshow with Cycle Plugin</title>
		<link>http://designgala.com/jquery-create-stunning-slideshow-with-cycle-plugin/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jquery-create-stunning-slideshow-with-cycle-plugin</link>
		<comments>http://designgala.com/jquery-create-stunning-slideshow-with-cycle-plugin/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 20:15:54 +0000</pubDate>
		<dc:creator>Mukesh Chapagain</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[cycle]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=1485</guid>
		<description><![CDATA[You can easily create stunning and very effective image slideshow with the jQuery Cycle Plugin. You don&#8217;t need to write long and difficult programming code. Just a few lines of code will be...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.designgala.com/wp-content/uploads/2010/01/13-07_jquery-cycle.jpg"><img class="alignleft size-full" src="http://www.designgala.com/wp-content/uploads/2010/01/13-07_jquery-cycle.jpg" alt="" width="550" height="398" /></a></p>
<p style="text-align: justify;">You can easily create stunning and very effective image slideshow with the jQuery Cycle Plugin. You don&#8217;t need to write long and difficult programming code. Just a few lines of code will be enough.</p>
<p><a href="http://www.cssbreak.com/examples/slideshow-cycle/" target="_blank">View Demo</a> | <a href="http://www.cssbreak.com/examples/slideshow-cycle.zip" target="_blank">Download Code</a></p>
<p>You need to have jQuery library and the jQuery Cycle plugin.</p>
<p><a href="http://docs.jquery.com/Downloading_jQuery" target="_blank">Download jQuery Library</a> | <a href="http://malsup.com/jquery/cycle/download.html" target="_blank">Download jQuery Cycle Plugin</a></p>
<blockquote><p>The jQuery Cycle Plugin is a slideshow plugin that supports many different types of transition effects. It supports pause-on-hover, auto-stop, auto-fit, before/after callbacks, click triggers and much more.</p></blockquote>
<blockquote><p>The Cycle Plugin provides many options for customizing your slideshow. The default option values can be overridden by passing an option object to the cycle method.</p></blockquote>
<p><a href="http://malsup.com/jquery/cycle/options.html" target="_blank">Here is the list of options</a></p>
<p>There are many effects that can be used with jQuery Cycle Plugin. You can find them all <a href="http://malsup.com/jquery/cycle/browser.html" target="_blank">here</a>. I have used some effects and created a demo.</p>
<p><a href="http://www.cssbreak.com/examples/slideshow-cycle/" target="_blank">View Demo</a> | <a href="http://www.cssbreak.com/examples/slideshow-cycle.zip" target="_blank">Download Code</a>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/jquery-create-stunning-slideshow-with-cycle-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>jQuery: How to get X-axis Y-axis value?</title>
		<link>http://designgala.com/jquery-how-to-get-x-axis-y-axis-value/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jquery-how-to-get-x-axis-y-axis-value</link>
		<comments>http://designgala.com/jquery-how-to-get-x-axis-y-axis-value/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 19:59:12 +0000</pubDate>
		<dc:creator>Mukesh Chapagain</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[axis]]></category>
		<category><![CDATA[value]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=1480</guid>
		<description><![CDATA[Well, it&#8217;s terrifically easy to get the x-axis and y-axis value of any point with jQuery. I mean the mouse pointer position. We simply do it with event.pageX and event.pageY. event.pageX gives the...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.designgala.com/wp-content/uploads/2010/01/parabola1.jpg"><img src="http://www.designgala.com/wp-content/uploads/2010/01/parabola1.jpg" alt="" width="320" height="220" class="alignleft size-full wp-image-1497" /></a></p>
<p>Well, it&#8217;s terrifically easy to get the x-axis and y-axis value of any point with jQuery. I mean the mouse pointer position. We simply do it with <strong>event.pageX</strong> and <strong>event.pageY</strong>.</p>
<p><strong>event.pageX</strong> gives the mouse position relative to the left edge of the document. And <strong>event.pageY</strong> gives the mouse position relative to the top edge of the document. </p>
<p>The following function fetches x and y axis on mousemove over the div content.</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">mousemove</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#value&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;x-axis: &quot;</span><span style="color: #339933;">+</span>e.<span style="color: #660066;">pageX</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;br /&gt;y-axis: &quot;</span><span style="color: #339933;">+</span>e.<span style="color: #660066;">pageY</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p><a target="_blank" href="http://www.cssbreak.com/examples/axis/">View Demo</a> | <a target="_blank" href="http://www.cssbreak.com/examples/axis.zip">Download Code</a></p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/jquery-how-to-get-x-axis-y-axis-value/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

