<?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>TutorBoy &#187; jQuery</title>
	<atom:link href="http://articles.tutorboy.com/topics/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://articles.tutorboy.com</link>
	<description>Log on to Techknowledgey</description>
	<lastBuildDate>Wed, 18 Jan 2012 09:06:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>jQuery: Mouse Over Text Color Filling Menu</title>
		<link>http://articles.tutorboy.com/2011/06/18/mouseover-color-filling-menu/</link>
		<comments>http://articles.tutorboy.com/2011/06/18/mouseover-color-filling-menu/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 16:34:00 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery Animate]]></category>
		<category><![CDATA[jQuery Events]]></category>
		<category><![CDATA[Jquery Menu]]></category>
		<category><![CDATA[Menus]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2859</guid>
		<description><![CDATA[
A simple jQuery effect for filling color over text. There is nothing much to do for this. Just create a ...]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-2862 alignleft" title="jQuery MouseOver Color Filling Menu" src="http://articles.tutorboy.com/content/uploads/2011/06/jQuery_MouseOver_Color_Filling_Menu-150x141.png" alt="" width="150" height="141" /></p>
<p>A simple jQuery effect for filling color over text. There is nothing much to do for this. Just create a UL LI menu, and add one more menu lable in-front of the normal label. Make sure that the alignments of both labels are in same line. And the second thing is to make the width of the top menu label to 0px; so it won&#8217;t display at the normal view. Do some css tricks to hide and align the labels inside the LI element. First Label color is Yellow which turns as<span id="more-2859"></span> invisible on normal view, now we can clearly visible the 2<sup>nd</sup> menu label.</p>
<h2><a title="jQuery: MouseOver Color Filling Menu - TutorBoy" href="http://demo.tutorboy.com/articles/jQuery_MouseOver_Color_Filling_Menu.html" target="_blank">Demo</a></h2>
<h2>HTML</h2>
<pre class="brush:html">&lt;ul id="mover_menu"&gt;
	&lt;li&gt;&lt;span class="hitem"&gt;Home&lt;/span&gt;&lt;span class="item"&gt;Home&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span class="hitem"&gt;Portfolio&lt;/span&gt;&lt;span class="item"&gt;Portfolio&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span class="hitem"&gt;Gallery&lt;/span&gt;&lt;span class="item"&gt;Gallery&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span class="hitem"&gt;About&lt;/span&gt;&lt;span class="item"&gt;About&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span class="hitem"&gt;Privacy&lt;/span&gt;&lt;span class="item"&gt;Privacy&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<h2>CSS</h2>
<pre class="brush:css">#mover_menu li{
		margin-right: 10px;
		float: left;
		list-style: none;
		letter-spacing: 0.5px;
		cursor: pointer;
	}

	#mover_menu li span.item {
		color: gray;
		margin: 10px;
		overflow: hidden;
		display: block;
	}

	#mover_menu li span.hitem {
		color: yellow;
		margin: 10px;
		overflow: hidden;
		display: block;
		position: absolute;
		width: 0;
	}</pre>
<p>And the final part is to write jQuery Script, assign mouseover event to LI and find the hover items object then apply animation properties. ie Animate the width 0 to span width of .item, so we will get the exact width of the current hover item. And on mouseout event set the width back to 0. The span.hitem &#8216;s overflow hidden property will help us to show the filling effect.</p>
<h2>jQuery</h2>
<pre class="brush:js">	$(document).ready(function() {

		$('#mover_menu li').mouseover(function(){

			$(this).find('span.hitem').animate({'width':  $(this).find('span.item').outerWidth()}, { queue: false, duration: 600})

		}).mouseout(function(){

			$(this).find('span.hitem').animate({'width': '0'}, { queue: false, duration: 600})

		});
	});</pre>
<p>I have tested it in IE 7 but some left padding need to be fixed, and perfectly working in all other browsers such as FF4, Chorme, Safari.</p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2011/06/18/mouseover-color-filling-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery: Grouping Elements on MouseOver Event</title>
		<link>http://articles.tutorboy.com/2011/06/11/jquery-grouping-elements-on-mouseover-event/</link>
		<comments>http://articles.tutorboy.com/2011/06/11/jquery-grouping-elements-on-mouseover-event/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 10:28:35 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MouseOver Event]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2839</guid>
		<description><![CDATA[Grouping elements on mouse over, for example, If You have two div elements div#leftBox and div#rightBox,  div#rightBox containing a ...]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-2842" href="http://articles.tutorboy.com/2011/06/11/jquery-grouping-elements-on-mouseover-event/jquery_grouping_elements_mouseover/"><img class="alignright size-thumbnail wp-image-2842" title="jQuery Grouping Elements MouseOver" src="http://articles.tutorboy.com/content/uploads/2011/06/jQuery_Grouping_Elements_MouseOver-150x150.png" alt="" width="150" height="150" /></a>Grouping elements on mouse over, for example, If You have two div elements div#leftBox and div#rightBox,  div#rightBox containing a group of different items in random order, and div#leftBox contains a items unique item from the div#rightBox. The task is to group similar items on mouse over of div#leftBox items.<span id="more-2839"></span></p>
<p><a class="view-demo" title="Demo: jQuery, Grouping Elements on MouseOver Event" href="http://demo.tutorboy.com/articles/jQuery_Grouping_Elements_MouseOver.html">View Demo</a></p>
<h2>HTML</h2>
<pre class="brush:html">&lt;div id="leftBox"&gt;
	&lt;div&gt;GREEN&lt;/div&gt;
	&lt;div&gt;BLUE&lt;/div&gt;
	&lt;div&gt;RED&lt;/div&gt;
&lt;/div&gt;

&lt;div id="rightBox"&gt;
	&lt;div&gt;GREEN&lt;/div&gt;
	&lt;div&gt;BLUE&lt;/div&gt;
	&lt;div&gt;RED&lt;/div&gt;
	&lt;div&gt;GREEN&lt;/div&gt;
	&lt;div&gt;BLUE&lt;/div&gt;
	&lt;div&gt;RED&lt;/div&gt;
	&lt;div&gt;GREEN&lt;/div&gt;
	&lt;div&gt;BLUE&lt;/div&gt;
	&lt;div&gt;RED&lt;/div&gt;
	&lt;div&gt;GREEN&lt;/div&gt;
&lt;/div&gt;</pre>
<h2>jQuery</h2>
<pre class="brush:js">$(document).ready(function() {
	var main = $('#rightBox div').clone(true);
	$("div#leftBox div").mouseover(function(){

		$("div#rightBox ."+$(this).attr('class')).each(function() {
			$("div#rightBox").prepend($(this));
		});

	}).mouseout(function() {
		$('#rightBox').empty().append(main);
	});
});</pre>
<p><strong>Hint</strong><br />
First we will attach mouse over event to the left div elements and select the class name of current item. and store the right div item to variable &#8216;main&#8217; to restore original order. On each mouse over parse the right div with current left items class name, and add each item as first child of the right div.</p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2011/06/11/jquery-grouping-elements-on-mouseover-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery: Clear Text field on Focus</title>
		<link>http://articles.tutorboy.com/2011/05/18/jquery-clear-text-field-on-focus/</link>
		<comments>http://articles.tutorboy.com/2011/05/18/jquery-clear-text-field-on-focus/#comments</comments>
		<pubDate>Tue, 17 May 2011 20:49:44 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery Events]]></category>
		<category><![CDATA[onBlur]]></category>
		<category><![CDATA[onFocus]]></category>
		<category><![CDATA[Text Field Clear]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2819</guid>
		<description><![CDATA[Simple jQuery script to clear the text field content on focus and retain if there is no entry in text ...]]></description>
			<content:encoded><![CDATA[<p>Simple jQuery script to clear the text field content on focus and retain if there is no entry in text field on blur event. The events used is Focus and Blur</p>
<p>Step 1:<br />
Attach events for Focus and Blur to the text filed,<span id="more-2819"></span></p>
<pre class="brush:js">$('input[type=text]').focus(function() {
		// code for focus event
});</pre>
<p>Step 2:<br />
Insert if condition check the value of the text field is &#8216;Search Content&#8217;, then clear the text field buy using <code>$(this).val('');</code></p>
<pre class="brush:js">$('input[type=text]').focus(function() {
		if($(this).val() == 'Search Content') $(this).val('');
});</pre>
<p>Step 3:<br />
Attach Event for the blur, and add &#8216;Search Content&#8217; to the text filed if the value is empty.</p>
<pre class="brush:js">	$('input[type=text]').focus(function() {
		if($(this).val() == 'Search Content') $(this).val('');
	}).blur(function() {
		if( $(this).val() == '') $(this).val('Search Content');
	});</pre>
<p>Step 4:<br />
Wrap everything into the ready state event. So the final code looks like</p>
<pre class="brush:js">$(document).ready(function(){

	$('input[type=text]').focus(function() {
		if($(this).val() == 'Search Content') $(this).val('');
	}).blur(function() {
		if( $(this).val() == '') $(this).val('Search Content');
	});
});</pre>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2011/05/18/jquery-clear-text-field-on-focus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jsFiddle &#8211;  An Online Editor for JavaScripts, HTML5 and CSS3</title>
		<link>http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/</link>
		<comments>http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 05:35:19 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Mootools]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Reference]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript Framework]]></category>
		<category><![CDATA[jQuery Plug-in]]></category>
		<category><![CDATA[jsfiddle]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2652</guid>
		<description><![CDATA[Recently I was thinking about to design a Live editor for CSS and HTML, while googling I found an amazing ...]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-2657" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-home-screen2/"><img class="size-thumbnail wp-image-2657 alignleft" title="jsfiddle.home.screen2" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.home_.screen2-150x150.png" alt="" width="150" height="150" /></a>Recently I was thinking about to design a Live editor for CSS and HTML, while googling I found an amazing tool. There you can edit CSS3, HTML5 and JavaScript. Not only JavaScript, we can load other popular libs like jQuery, mootools, dojo etc. You can use their API on your site. <a title="jsFiddle - Online Editor for the Web (JavaScript, MooTools, jQuery, Prototype, YUI, Glow and Dojo, HTML, CSS)" href="http://http://jsfiddle.net/" target="_blank">JsFiddle </a>is a playground for web developers, a tool which may be used in many ways. <span id="more-2652"></span>One can use it as an online editor for snippets build from HTML, CSS and JavaScript. The code can then be shared with others, embedded on a blog, etc.</p>
<p>I&#8217;m very much curious about the flow/working of the tool, so  I did <a title="MouseOver Auto Scroller Menu Using jQuery and CSS" href="http://articles.tutorboy.com/2010/10/05/mouseover-auto-scroller-menu-using-jquery-and-css/" target="_blank">MouseOver Auto Scroller Menu Using jQuery and CSS</a> in  <a href="http://jsfiddle.net/Xr9Ua/1/" target="_blank">Here you find the codes in JsFiddle</a>. The screens gives you the steps which I followed.</p>
<p>&nbsp;</p>
<div id="attachment_2660" class="wp-caption alignnone" style="width: 374px"><a rel="attachment wp-att-2660" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-screen1/"><img class="size-medium wp-image-2660" title="jsfiddle.screen1" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.screen1-300x261.png" alt="" width="364" height="315" /></a><p class="wp-caption-text">Editor Window</p></div>
<p>&nbsp;</p>
<div id="attachment_2658" class="wp-caption alignleft" style="width: 178px"><a rel="attachment wp-att-2658" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-javascript-select-screen3/"><img class="size-medium wp-image-2658" title="jsfiddle.javascript.select.screen3" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.javascript.select.screen3-168x300.png" alt="" width="168" height="300" /></a><p class="wp-caption-text">Choosing JavaScript libs</p></div>
<div id="attachment_2655" class="wp-caption alignleft" style="width: 178px"><a rel="attachment wp-att-2655" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-adding-other-resource-screen4/"><img class="size-medium wp-image-2655" title="jsfiddle.adding.other.resource.screen4" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.adding.other_.resource.screen4-168x300.png" alt="" width="168" height="300" /></a><p class="wp-caption-text">Adding external resource files</p></div>
<div id="attachment_2656" class="wp-caption alignleft" style="width: 403px"><a rel="attachment wp-att-2656" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-complete-screen7/"><img class="size-medium wp-image-2656" title="jsfiddle.complete.screen7" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.complete.screen7-300x261.png" alt="" width="393" height="341" /></a><p class="wp-caption-text">The Editor View</p></div>
<div id="attachment_2659" class="wp-caption alignleft" style="width: 409px"><a rel="attachment wp-att-2659" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-result-screen5/"><img class="size-medium wp-image-2659" title="jsfiddle.result.screen5" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.result.screen5-300x146.png" alt="" width="399" height="194" /></a><p class="wp-caption-text">Result </p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Hope you would enjoy this tool.<br />
 <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Backstretch</title>
		<link>http://articles.tutorboy.com/2011/02/28/jquery-backstretch/</link>
		<comments>http://articles.tutorboy.com/2011/02/28/jquery-backstretch/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 06:25:27 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[image streching]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jQuery Plug-in]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2603</guid>
		<description><![CDATA[
I have found one interesting stuff in jQuery, to resize the image with window dimension. ie if you want to fit the background ...]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-2609 alignright" title="jquery.backstretch.screen_1" src="http://articles.tutorboy.com/content/uploads/2011/02/jquery.backstretch.screen_1.png" alt="" width="163" height="205" /><br />
I have found one interesting stuff in jQuery, to resize the image with window dimension. ie if you want to fit the background image to the screen what ever the window size or screen resolution, just use it this snippet.</p>
<p><a class="wp-caption" href="http://demo.tutorboy.com/articles/jquery.backstretch.demo/jquery_backstretch_demo.html" target="_self">View Demo</a> <a class="wp-caption" href="http://downloads.tutorboy.com/articles/jquery.backstretch.demo.zip" target="_self">Download Source<br />
</a></p>
<p><span id="more-2603"></span></p>
<h2>JQuery</h2>
<pre class="brush:js">&lt;script src="jquery.backstretch.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(document).ready(function() {
    $.backstretch("http://your/image/path");
});
&lt;/script&gt;</pre>
<p>You can download the plugin files <a title="jquery-backstretch" href="https://github.com/srobbin/jquery-backstretch/">here</a></p>
<p><a title="jquery-backstretch" href="https://github.com/srobbin/jquery-backstretch/"></a><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px;"><img class="alignnone size-full wp-image-2610" title="jquery.backstretch.screen_2" src="http://articles.tutorboy.com/content/uploads/2011/02/jquery.backstretch.screen_2.png" alt="" width="381" height="329" /></span></p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2011/02/28/jquery-backstretch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Page Overlay using jQuery and CSS</title>
		<link>http://articles.tutorboy.com/2010/10/12/simple-page-overlay-using-jquery-and-css/</link>
		<comments>http://articles.tutorboy.com/2010/10/12/simple-page-overlay-using-jquery-and-css/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 11:31:50 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery from scratch]]></category>
		<category><![CDATA[Js]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2546</guid>
		<description><![CDATA[Simple script for page overlay using jQuery and CSS property. It will place a div after the body tag, and ...]]></description>
			<content:encoded><![CDATA[<p>Simple script for page overlay using jQuery and CSS property. It will place a <strong>div </strong>after the <strong>body </strong>tag, and apply fadeIn animation for the smoothing effect. Once the page overlay div is visible, by clicking on the fade in area you can be remove the overlay. Here is the code.<span id="more-2546"></span></p>
<h2>jQuery</h2>
<pre class="brush:js">$(document).ready(function(){

    // Appedning the overlay div
    $('body').append('&lt;div id="fadeOverlay" style="opacity:0.80;display:none;position:fixed;left:0;top:0;width:100%;height:100%;z-index:9999;background:#000;"&gt;&lt;/div&gt;');
    // Apply fadeIn animation for the smoothing effect.
    $('#fadeOverlay').css({'filter' : 'alpha(opacity=80)'}).fadeIn();
    // Remove the overlay div when clicking on the fade in area.
    $('#fadeOverlay').click(function() {
        $(this).fadeOut("slow", function() {$(this).remove();});
    });

});</pre>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/10/12/simple-page-overlay-using-jquery-and-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MouseOver Auto Scroller Menu Using jQuery and CSS</title>
		<link>http://articles.tutorboy.com/2010/10/05/mouseover-auto-scroller-menu-using-jquery-and-css/</link>
		<comments>http://articles.tutorboy.com/2010/10/05/mouseover-auto-scroller-menu-using-jquery-and-css/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 06:03:05 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Auto Scroller Menu]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Jquery Listing]]></category>
		<category><![CDATA[Jquery Menu]]></category>
		<category><![CDATA[Js]]></category>
		<category><![CDATA[Menus]]></category>
		<category><![CDATA[MouseOver]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2524</guid>
		<description><![CDATA[On Mouse Over auto stroller menu using  jQuery and CSS. The menu is build with ul li elements, menus are ...]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://articles.tutorboy.com/jquery/mouseover-auto-scroller-menu-using-jquery-and-css.html"><img class="alignright size-full wp-image-2528" title="auto_slider_menu" src="http://articles.tutorboy.com/content/uploads/2010/10/auto_slider_menu.jpg" alt="auto slider menu image" width="286" height="144" /></a>On Mouse Over auto stroller menu using  jQuery and CSS. The menu is build with <em><strong>ul li</strong></em> elements, menus are arranged on a menu_holder div and it will shows only a limited number of menus at the menu area. Rest of them are visible while mouse move on the menu area. <span id="more-2524"></span>All the menus will slide top to bottom, and bottom-top according to the up and downward movement of the mouse. The scroll function enabled only when the height of the ul li greater than the menu holder.</p>
<p><a class="wp-caption" href="http://articles.tutorboy.com/content/mouseover-auto-scroller-menu-using-jquery-and-css.html" target="_self">View Demo</a> <a class="wp-caption" href="http://downloads.tutorboy.com/articles/jquery_mouseover_auto_scroller.zip" target="_self">Download Source<br />
</a></p>
<h2>CSS</h2>
<pre class="brush:css">&lt;style&gt;
body{font: normal normal normal 15px/normal arial, sans-serif;margin:0 auto;}
#container{
	width:250px; /* Width and Height you can change */
	height:108px; /* Height of the menu container, 4 li elements, each li have 27px height so total 108*/
	padding:10px;
	border:1px solid #ccc;
	border-radius : 5px;
	-moz-border-radius : 5px;
	-webkit-border-radius : 5px;
	background:#CCC;
	font-family: sans-serif, Verdana, Arial;
	margin:0 auto;
}
#menu_holder{
	margin:0;
	padding:0;
	background:#FFF;
	overflow:hidden; /* make the overflow as hidden, like a mask layer*/
	height:108px; /* Height of the menu holder, same as the container*/
	position:fixed;
	width:250px;
}
#slider {
	list-style-type:none;
	margin:0;
	padding:0;
	position:absolute;
	width:250px;
}
#slider li{
	background:#0FF;
	padding:3px;
	border-bottom:1px solid #262626;
	background : #000;
	color:#92B3DE;
	text-align:center;
}
#slider li:hover{
	color:#FFF;
	background:#2A2A2A;
	cursor:pointer;
}
&lt;/style&gt;</pre>
<h2>HTML</h2>
<p>The Menu holder contains all the menu items. We set the holder <strong>height </strong>as a fixed(but you can change) , from my example I set it as 108px so I can accommodate 4 menus in the menu holder. Each menu having 27px height and total 27&#215;5 = 108. If you wanna include more menus inside the holder just calculate the height with your <strong>li&#8217;</strong>s height.  Set the <strong>menu holder</strong> div&#8217;s <strong>overflow </strong>property as <strong>hidden</strong>, so that if the menu height increases then the rest of the entries will not shown, that is the logic behind. By moving mouse over to the menu holder the <strong>slider </strong>div&#8217;s <strong>top</strong> value will increase and decrease by the up/down mouse movement.  The menu holder will act as a mask layer over the <strong>UL LI</strong>. So it smoothly slide inside the menu_holder div <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush:html">&lt;div id="container"&gt;
    &lt;div id="menu_holder"&gt;
        &lt;ul id="slider"&gt;
            &lt;li&gt;Menu Content 1&lt;/li&gt;
            &lt;li&gt;Menu Content 2&lt;/li&gt;
            &lt;li&gt;Menu Content 3&lt;/li&gt;
            &lt;li&gt;Menu Content 4&lt;/li&gt;
            &lt;li&gt;Menu Content 5&lt;/li&gt;
            &lt;li&gt;Menu Content 6&lt;/li&gt;
            &lt;li&gt;Menu Content 7&lt;/li&gt;
            &lt;li&gt;Menu Content 8&lt;/li&gt;
            &lt;li&gt;Menu Content 9&lt;/li&gt;
            &lt;li&gt;Menu Content 10&lt;/li&gt;
            &lt;li&gt;Menu Content 11&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
&lt;/div&gt;</pre>
<p>Then you need <a href="http://code.google.com/apis/libraries/devguide.html#jquery">jQuery </a>lib file and jQuery easing plugin file. Download the easing plugin from <a href="http://gsgd.co.uk/sandbox/jquery/easing/">here</a>. The easing plug-in is optional, if you don&#8217;t want to use the easing effect try the commented code inside the script section.</p>
<h2>JavaScript Files</h2>
<pre class="brush:js">&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="jquery.easing.1.3.js"&gt;&lt;/script&gt;</pre>
<h2>jQuery</h2>
<p>Here is the complete script for the slider function. We trigger the mouse event for the menu holder div, and calculate the offset Y of the menu holder from the current mouse Y. And finally apply the values into the equation. <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush:js">$(document).ready(function() {
	// hover color change effect
	$("#slider li").hover(function() {
		$(this).animate({opacity: 0.90}, 100, function(){
			$(this).animate({opacity: 1}, 0);
		} );
	});
	// Trigger mouse move event over the 'menu_holder'.
	$("#menu_holder").mousemove(function(e) {
		// Enable scroll function only when the height of the 'slider' or menu is greater than the 'menu_holder'.
		if($(this).height() &lt; $("#slider").height()) {
			// Calculate the distance value from the 'menu_holder' y pos and page Y pos.
			var distance = e.pageY - $(this).offset().top;
			// Get the percentage value with respect to the Mouse Y on the 'menu_holder'.
			var percentage = distance / $(this).height();
			// Calculate the new Y position of the 'slider'.
			var targetY = -Math.round(($("#slider").height() - $(this).height()) * percentage);
			// With jQuery easing funtion from easing plugin.
			$('#slider').animate({top: [targetY+"px", "easeOutCirc"]}, { queue:false, duration:200 });
			// Without easeing function. by default jQuery have 'swing'.
			//$('#slider').animate({top: [targetY+"px", "easeOutCirc"]}, { queue:false, duration:200 });
		}
	});
});</pre>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/10/05/mouseover-auto-scroller-menu-using-jquery-and-css/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>XPath in JavaScript, PHP, ActionScript and jQuery</title>
		<link>http://articles.tutorboy.com/2010/09/27/xpath-in-javascript-php-actionscript-and-jquery/</link>
		<comments>http://articles.tutorboy.com/2010/09/27/xpath-in-javascript-php-actionscript-and-jquery/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 06:30:15 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Action Script 2.0]]></category>
		<category><![CDATA[Action Script 3.0]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[Flash Component]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery from scratch]]></category>
		<category><![CDATA[Js]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2497</guid>
		<description><![CDATA[XPath, the XML Path Language, is a query language for selecting nodes from an XML document or we can say ...]]></description>
			<content:encoded><![CDATA[<p><strong>XPath</strong>, the <strong>XML Path Language</strong>, is a query language for selecting nodes from an XML document or we can say XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer. It also provides basic facilities for manipulation of strings, numbers and Boolean. Most of the languages were support this feature, if you didn&#8217;t find in respected language you will get from 3rd party libs. Here are some quick reference links to XPath &amp; XPath Libs.<span id="more-2497"></span></p>
<h1>Reference Links</h1>
<p>1. <a title="XPath Syntax" href="http://www.w3schools.com/XPath/xpath_syntax.asp" target="_blank">XPath Syntax</a></p>
<p>2. <a title="XML Path Language (XPath)" href="http://www.w3.org/TR/xpath/" target="_blank">XML Path Language (XPath)</a></p>
<p>3. <a title="XPath Examples .NET Framework 4" href="http://msdn.microsoft.com/en-us/library/ms256086.aspx" target="_blank">XPath Examples .NET Framework 4</a></p>
<p>4. <a title="Introduction to using XPath in JavaScript" href="https://developer.mozilla.org/en/Introduction_to_using_XPath_in_JavaScript" target="_blank">Introduction to using XPath in JavaScript</a></p>
<p>5. <a title="An XPath implementation for ActionScript 3.0. " href="http://code.google.com/p/xpath-as3/" target="_blank">An XPath implementation for ActionScript 3.0. </a></p>
<p>6. <a title="PHP XPath Tutorial " href="http://ditio.net/2008/12/01/php-xpath-tutorial-advanced-xml-part-1/" target="_blank">PHP XPath Tutorial </a></p>
<p>7. <a title="jQuery  XPath Selectors" href="http://docs.jquery.com/DOM/Traversing/Selectors" target="_blank">jQuery  XPath Selectors</a></p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/09/27/xpath-in-javascript-php-actionscript-and-jquery/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>jQuery Notification Message like StackOverflow</title>
		<link>http://articles.tutorboy.com/2010/09/10/jquery-notification-message-like-stackoverflow/</link>
		<comments>http://articles.tutorboy.com/2010/09/10/jquery-notification-message-like-stackoverflow/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 10:47:28 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Js]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2423</guid>
		<description><![CDATA[Here is the source code of the notification message like in stackoverflow. Make it easy with jQuery  and CSS. Place ...]]></description>
			<content:encoded><![CDATA[<p>Here is the source code of the notification message like in stackoverflow. Make it easy with jQuery  and CSS. Place all your notification messages inside a div and apply CSS propertie<a href="../jquery/jquery-notification-message-like-stackoverflow.html"><img class="size-full wp-image-2426 alignright" title="Notification" src="../content/uploads/2010/09/Notification.jpg" alt="" width="315" height="109" /></a>s <code>position:fixed;top:0px;left:0px; </code> And place the close button with the span and a elements. <span id="more-2423"></span>&lt;span&gt;&lt;a title=&#8221;dismiss this notification&#8221;&gt;x&lt;/a&gt;&lt;/span&gt;. Hide the div element <code>display: none;</code>. and use jQuery to apply fadeIn and fadeOut. <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p><a class="wp-caption" href="http://articles.tutorboy.com/content/jquery-notification-message.html" target="_blank">View Demo</a></p>
<h2>HTML</h2>
<pre class="brush:html">&lt;div id="notification" style="display: none;"&gt;
 Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
 &lt;span class="dismiss"&gt;&lt;a title="dismiss this notification"&gt;x&lt;/a&gt;&lt;/span&gt;
&lt;/div&gt;</pre>
<h2>CSS</h2>
<pre class="brush:css">#notification {
    font-family:Arial,Helvetica,sans-serif;
    position:fixed;
    top:0px;
    left:0px;
    width:100%;
    z-index:105;
    text-align:left;
    font-weight:normal;
    font-size:100%;
    color:white;
    background-color:#000;
    padding:5px;
}
#notification span.dismiss {
    border:2px solid #FFF;
    padding:0 5px;
    cursor:pointer;
    float:right;
    margin-right:10px;
}
#notification a {
    color:white;
    text-decoration:none;
    font-weight:bold
}</pre>
<h2>jQuery</h2>
<pre class="brush:js">&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
$(document).ready(function() {
    $("#notification").fadeIn("slow");
    $(".dismiss").click(function(){
	$("#notification").fadeOut("slow");
    });
});</pre>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/09/10/jquery-notification-message-like-stackoverflow/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Include js files inside a js file</title>
		<link>http://articles.tutorboy.com/2010/09/06/include-js-files-inside-a-js-file/</link>
		<comments>http://articles.tutorboy.com/2010/09/06/include-js-files-inside-a-js-file/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 05:50:14 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Js]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2383</guid>
		<description><![CDATA[Some times you want to include or load other .js files inside another .js files or on document. JavaScript doesn&#8217;t ...]]></description>
			<content:encoded><![CDATA[<p>Some times you want to include or load other .js files inside another .js files or on document. JavaScript doesn&#8217;t have any function to <code>include </code>any external js files. Writing script tag each time to DOM is not a good practice. Here the solution to load the script tag inside the head.<span id="more-2383"></span></p>
<h2>JavaScript</h2>
<pre class="brush:js">var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'externalScriptFile.js';
document.getElementsByTagName("head")[0].appendChild(script);
</pre>
<p>Use the above JavaScript code inside your body or .js file. The <code>script.src</code> is the file name which you want to load and the script will append to the <code>head</code> tag. If you have to load more files like this, just copy paste this into a function body.</p>
<h2>JavaScript</h2>
<pre class="brush:js">function include(jsFile) {
	var script = document.createElement('script');
	script.type = 'text/javascript';
	script.src = jsFile;
	document.getElementsByTagName("head")[0].appendChild(script);
}
include('externalScriptFile1.js');
include('externalScriptFile2.js');
</pre>
<p><strong>W</strong>ell you are done with that, now just read something about the <code>script </code>tag in <code>HTML</code>. The script tag is used to load or run scripts HTML, we use mainly 3 attributes for the script. No need to use the commenting(&lt;!&#8211; //&#8211;&gt;) tags inside the script tag, that is for the first generation browsers <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  to prevent scripts from showing up as text.</p>
<p>Script tag to load the script file</p>
<pre class="brush:js">&lt;script src="filename.js" type="text/javascript"&gt;&lt;/script&gt;
</pre>
<p>You should not write any codes inside the script tags when its use to load any file(s). Because if the <code>src</code> is present the script tag will considered as a load process. So any script inside that will not execute. But you can use the script with-out <code>src</code> will help you to execute the script.<br />
Script tag to execute the script</p>
<pre class="brush:js">&lt;script type="text/javascript"&gt;document.write("Hello World!!!");&lt;/script&gt;
</pre>
<h2>Attributes</h2>
<p><strong>src </strong>:  This attribute specifies the location of an external script.<br />
<strong>type </strong>:  This attribute specifies the scripting language of the element&#8217;s contents and overrides<br />
the default scripting language. The scripting language is specified as a content type<br />
(e.g., &#8220;text/javascript&#8221;). Authors must supply a value for this attribute.<br />
There is no default value for this attribute.<br />
<strong>defer </strong>:  When set, this boolean attribute provides a hint to the user agent that the script<br />
is not going to generate any document content (e.g., no &#8220;document.write&#8221; in javascript)<br />
and thus, the user agent can continue parsing and rendering.<br />
<strong>language </strong>: This attribute specifies the scripting language of the contents of this element.<br />
Its value is an identifier for the language, but since these identifiers are<br />
not standard, this attribute has been <em><strong>deprecated </strong></em>in favor of type.<br />
Reference: <a href="http://www.w3.org/TR/REC-html40/interact/scripts.html" target="_blank">http://www.w3.org/TR/REC-html40/interact/scripts.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/09/06/include-js-files-inside-a-js-file/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

