<?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>Pankaj Pandey &#187; navigation</title> <atom:link href="http://www.pankajpandey.com/tag/navigation/feed/" rel="self" type="application/rss+xml" /><link>http://www.pankajpandey.com</link> <description>Web design &#38; Internet Marketing Consultant</description> <lastBuildDate>Thu, 19 Jan 2012 07:54:30 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Jquery Image rollover with demo</title><link>http://www.pankajpandey.com/2009/03/jquery-image-rollover-with-demo/</link> <comments>http://www.pankajpandey.com/2009/03/jquery-image-rollover-with-demo/#comments</comments> <pubDate>Mon, 23 Mar 2009 22:09:01 +0000</pubDate> <dc:creator>Pankaj</dc:creator> <category><![CDATA[Featured]]></category> <category><![CDATA[Web development]]></category> <category><![CDATA[demo]]></category> <category><![CDATA[download]]></category> <category><![CDATA[effects]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[navigation]]></category> <category><![CDATA[xhtml]]></category><guid
isPermaLink="false">http://www.pankajpandey.com/?p=79</guid> <description><![CDATA[I have given a code in my earlier post for jquery image rollover. Now here are the final code and guide how to use this code. you need to creative two image ie: one for normal state and one for active/rollover state. name it like imagename.gif and imagename_active.gif. put your image in your HTML document. [...]]]></description> <content:encoded><![CDATA[<p>I have given a code in my earlier post for jquery image rollover. Now here are the final code and guide how to use this code.</p><ol><li>you need to creative two image ie: one for normal state and one for active/rollover state. name it like imagename.gif and imagename_active.gif.</li><li>put your image in your HTML document.</li><li>put all your image in normal state. remember to keep the active state image in same folder.</li><li>include jquery latest script from<a
rel="nofollow" href="http://jquery.com/"> jquery website</a> and include script on your head section.</li><li>copy below code and paste after jquery include. (you can put this code in common include file and include after jquery include.)</li><li>don&#8217;t forget to change &#8220;#nav td&#8221; with your a element parent element in below script.</li></ol><div
class="codecolorer-container javascript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/>9<br
/>10<br
/>11<br
/>12<br
/>13<br
/>14<br
/>15<br
/>16<br
/>17<br
/>18<br
/>19<br
/>20<br
/>21<br
/>22<br
/>23<br
/>24<br
/>25<br
/></div></td><td><div
class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #003366; font-weight: bold;">function</span> getLeaf<span
style="color: #009900;">&#40;</span>url<span
style="color: #009900;">&#41;</span> <span
style="color: #009900;">&#123;</span><br
/> <span
style="color: #003366; font-weight: bold;">var</span> splited<span
style="color: #339933;">=</span>url.<span
style="color: #660066;">split</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">'?'</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><span
style="color: #006600; font-style: italic;">// remove all the parameter from url</span><br
/> url<span
style="color: #339933;">=</span>splited<span
style="color: #009900;">&#91;</span><span
style="color: #CC0000;">0</span><span
style="color: #009900;">&#93;</span><span
style="color: #339933;">;</span><br
/> <span
style="color: #000066; font-weight: bold;">return</span> url.<span
style="color: #660066;">substring</span><span
style="color: #009900;">&#40;</span>url.<span
style="color: #660066;">lastIndexOf</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;/&quot;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">+</span><span
style="color: #CC0000;">1</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><span
style="color: #006600; font-style: italic;">// return file name without domain and path</span><br
/> <span
style="color: #009900;">&#125;</span> &nbsp;<br
/> jQuery.<span
style="color: #660066;">fn</span>.<span
style="color: #660066;">extend</span><span
style="color: #009900;">&#40;</span><span
style="color: #009900;">&#123;</span><br
/> enter<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: #006600; font-style: italic;">//plugins creation</span><br
/> <span
style="color: #000066; font-weight: bold;">return</span> <span
style="color: #000066; font-weight: bold;">this</span>.<span
style="color: #660066;">each</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><br
/> <span
style="color: #003366; font-weight: bold;">var</span> pth <span
style="color: #339933;">=</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;">find</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;img&quot;</span><span
style="color: #009900;">&#41;</span><span
style="color: #009900;">&#91;</span><span
style="color: #CC0000;">0</span><span
style="color: #009900;">&#93;</span><span
style="color: #339933;">;</span><br
/> <span
style="color: #006600; font-style: italic;">//alert($(this).children().attr(&quot;href&quot;));</span><br
/> <span
style="color: #000066; font-weight: bold;">if</span><span
style="color: #009900;">&#40;</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;">children</span><span
style="color: #009900;">&#40;</span><span
style="color: #009900;">&#41;</span>.<span
style="color: #660066;">attr</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;href&quot;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">==</span>getLeaf<span
style="color: #009900;">&#40;</span>document.<span
style="color: #660066;">location</span>.<span
style="color: #660066;">href</span><span
style="color: #009900;">&#41;</span><span
style="color: #009900;">&#41;</span><span
style="color: #009900;">&#123;</span><span
style="color: #006600; font-style: italic;">// check that the link url and document url is same</span><br
/> $<span
style="color: #009900;">&#40;</span>pth<span
style="color: #009900;">&#41;</span>.<span
style="color: #660066;">attr</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;src&quot;</span><span
style="color: #339933;">,</span>pth.<span
style="color: #660066;">src</span>.<span
style="color: #660066;">replace</span><span
style="color: #009900;">&#40;</span><span
style="color: #009966; font-style: italic;">/.gif/g</span><span
style="color: #339933;">,</span> <span
style="color: #3366CC;">'_active.gif'</span><span
style="color: #009900;">&#41;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><br
/> <span
style="color: #009900;">&#125;</span> <span
style="color: #000066; font-weight: bold;">else</span><span
style="color: #009900;">&#123;</span><br
/> $<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;">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><br
/> $<span
style="color: #009900;">&#40;</span>pth<span
style="color: #009900;">&#41;</span>.<span
style="color: #660066;">attr</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;src&quot;</span><span
style="color: #339933;">,</span>pth.<span
style="color: #660066;">src</span>.<span
style="color: #660066;">replace</span><span
style="color: #009900;">&#40;</span><span
style="color: #009966; font-style: italic;">/.gif/g</span><span
style="color: #339933;">,</span> <span
style="color: #3366CC;">'_active.gif'</span><span
style="color: #009900;">&#41;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><span
style="color: #006600; font-style: italic;">// mouse over Image</span><br
/> <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><br
/> $<span
style="color: #009900;">&#40;</span>pth<span
style="color: #009900;">&#41;</span>.<span
style="color: #660066;">attr</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;src&quot;</span><span
style="color: #339933;">,</span>pth.<span
style="color: #660066;">src</span>.<span
style="color: #660066;">replace</span><span
style="color: #009900;">&#40;</span><span
style="color: #009966; font-style: italic;">/_active.gif/g</span><span
style="color: #339933;">,</span> <span
style="color: #3366CC;">'.gif'</span><span
style="color: #009900;">&#41;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><span
style="color: #006600; font-style: italic;">// mouse out image</span><br
/> <span
style="color: #009900;">&#125;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><br
/> <span
style="color: #009900;">&#125;</span><br
/> <span
style="color: #009900;">&#125;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><br
/> <span
style="color: #009900;">&#125;</span><br
/> <span
style="color: #009900;">&#125;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><br
/> $<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> &nbsp;<span
style="color: #006600; font-style: italic;">// Document is ready</span><br
/> $<span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;#nav td&quot;</span><span
style="color: #009900;">&#41;</span>.<span
style="color: #660066;">enter</span><span
style="color: #009900;">&#40;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><span
style="color: #006600; font-style: italic;">// call the function</span><br
/> <span
style="color: #009900;">&#125;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span></div></td></tr></tbody></table></div><p><a
href="http://www.pankajpandey.com/wp-content/uploads/2009/03/demo.zip">Jquery Image rollover demo download</a> Let me know if you are not able to implement this code. I will happy to assist you.</p> ]]></content:encoded> <wfw:commentRss>http://www.pankajpandey.com/2009/03/jquery-image-rollover-with-demo/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> <item><title>Jquery Image rollover</title><link>http://www.pankajpandey.com/2009/02/jquery-image-rollover/</link> <comments>http://www.pankajpandey.com/2009/02/jquery-image-rollover/#comments</comments> <pubDate>Sun, 15 Feb 2009 14:26:14 +0000</pubDate> <dc:creator>Pankaj</dc:creator> <category><![CDATA[Web development]]></category> <category><![CDATA[effects]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[navigation]]></category> <category><![CDATA[xhtml]]></category><guid
isPermaLink="false">http://pandey.ws/pankajblog/?p=49</guid> <description><![CDATA[if you need unobstructive JavaScript for image rollover you can use following code. I am not providing any detail markups for that if you face some problem to use that let me know. i will provide a demo section very soon for all of script. 1234567891011121314151617jQuery.fn.extend&#40;&#123; &#160;enter: function&#40;&#41; &#123; &#160; &#160; return this.each&#40;function&#40;&#41; &#123; &#160; [...]]]></description> <content:encoded><![CDATA[<p>if you need unobstructive JavaScript for image rollover you can use following code. I am not providing any detail markups for that if you face some problem to use that let me know. i will provide a demo section very soon for all of script.</p><div
class="codecolorer-container javascript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/>9<br
/>10<br
/>11<br
/>12<br
/>13<br
/>14<br
/>15<br
/>16<br
/>17<br
/></div></td><td><div
class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">jQuery.<span
style="color: #660066;">fn</span>.<span
style="color: #660066;">extend</span><span
style="color: #009900;">&#40;</span><span
style="color: #009900;">&#123;</span><br
/> &nbsp;enter<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><br
/> &nbsp; &nbsp; <span
style="color: #000066; font-weight: bold;">return</span> <span
style="color: #000066; font-weight: bold;">this</span>.<span
style="color: #660066;">each</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><br
/> &nbsp; &nbsp; &nbsp; <span
style="color: #003366; font-weight: bold;">var</span> pth <span
style="color: #339933;">=</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;">find</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;img&quot;</span><span
style="color: #009900;">&#41;</span><span
style="color: #009900;">&#91;</span><span
style="color: #CC0000;">0</span><span
style="color: #009900;">&#93;</span><span
style="color: #339933;">;</span><br
/> &nbsp; &nbsp; &nbsp; <span
style="color: #000066; font-weight: bold;">if</span><span
style="color: #009900;">&#40;</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;">children</span><span
style="color: #009900;">&#40;</span><span
style="color: #009900;">&#41;</span>.<span
style="color: #660066;">attr</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;href&quot;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">==</span>document.<span
style="color: #660066;">location</span>.<span
style="color: #660066;">href</span><span
style="color: #009900;">&#41;</span><span
style="color: #009900;">&#123;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$<span
style="color: #009900;">&#40;</span>pth<span
style="color: #009900;">&#41;</span>.<span
style="color: #660066;">attr</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;src&quot;</span><span
style="color: #339933;">,</span>pth.<span
style="color: #660066;">src</span>.<span
style="color: #660066;">replace</span><span
style="color: #009900;">&#40;</span><span
style="color: #009966; font-style: italic;">/.gif/g</span><span
style="color: #339933;">,</span> <span
style="color: #3366CC;">'_over.gif'</span><span
style="color: #009900;">&#41;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span
style="color: #009900;">&#125;</span> <span
style="color: #000066; font-weight: bold;">else</span><span
style="color: #009900;">&#123;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<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;">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><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span
style="color: #009900;">&#40;</span>pth<span
style="color: #009900;">&#41;</span>.<span
style="color: #660066;">attr</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;src&quot;</span><span
style="color: #339933;">,</span>pth.<span
style="color: #660066;">src</span>.<span
style="color: #660066;">replace</span><span
style="color: #009900;">&#40;</span><span
style="color: #009966; font-style: italic;">/.gif/g</span><span
style="color: #339933;">,</span> <span
style="color: #3366CC;">'_over.gif'</span><span
style="color: #009900;">&#41;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <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><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$<span
style="color: #009900;">&#40;</span>pth<span
style="color: #009900;">&#41;</span>.<span
style="color: #660066;">attr</span><span
style="color: #009900;">&#40;</span><span
style="color: #3366CC;">&quot;src&quot;</span><span
style="color: #339933;">,</span>pth.<span
style="color: #660066;">src</span>.<span
style="color: #660066;">replace</span><span
style="color: #009900;">&#40;</span><span
style="color: #009966; font-style: italic;">/_over.gif/g</span><span
style="color: #339933;">,</span> <span
style="color: #3366CC;">'.gif'</span><span
style="color: #009900;">&#41;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span
style="color: #009900;">&#125;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color: #009900;">&#125;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color: #009900;">&#125;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><br
/> &nbsp; &nbsp; <span
style="color: #009900;">&#125;</span><br
/> <span
style="color: #009900;">&#125;</span><span
style="color: #009900;">&#41;</span><span
style="color: #339933;">;</span><br
/> $<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;#nav li&quot;</span><span
style="color: #009900;">&#41;</span>.<span
style="color: #660066;">enter</span><span
style="color: #009900;">&#40;</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></div></td></tr></tbody></table></div><p>I have created this script for dot net development where navigation is in master page. So I have highlighed current page with if condition on line 5 on code ($(this).children().attr(&#8220;href&#8221;)==document.location.href). i have used gif images you can change code according to your image format.</p> ]]></content:encoded> <wfw:commentRss>http://www.pankajpandey.com/2009/02/jquery-image-rollover/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: basic
Database Caching 14/31 queries in 0.275 seconds using disk: basic
Object Caching 964/998 objects using disk: basic

Served from: www.pankajpandey.com @ 2012-02-08 00:44:16 -->
