<?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>Web Development Blog &#187; Snippets</title>
	<atom:link href="http://eisabainyo.net/weblog/category/snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://eisabainyo.net/weblog</link>
	<description>Web Development, Web Design, Web Applications, Web 2.0, AJAX, WordPress Themes, Search Engine Optimisation, Latest Technologies and more..</description>
	<lastBuildDate>Sun, 05 Sep 2010 02:18:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>10 Useful jQuery Snippets</title>
		<link>http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/</link>
		<comments>http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 02:20:01 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1599</guid>
		<description><![CDATA[Following are 10 Useful jQuery snippets for any website.   To use these snippets, you must include jQuery library in your page first and then add the snippets inside DOM ready function as follow:
$(document).ready(function() {
   // add your snippets here
});
1. Display Warning Message for IE 6 Users
if ( (jQuery.browser.msie) &#38;&#38; (parseInt(jQuery.browser.version) &#60; [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/">10 Useful jQuery Snippets</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/02/20/store-login-information-in-cookie-using-jquery/" rel="bookmark" title="February 20, 2009">Store login information in cookie using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/06/17/clear-default-text-in-input-boxes-on-click-with-jquery/" rel="bookmark" title="June 17, 2010">Clear default text in input boxes on click with jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/28/check-username-availability-using-ajax-and-jquery/" rel="bookmark" title="May 28, 2009">Check username availability using AJAX and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/07/back-to-top-link-with-jquery/" rel="bookmark" title="April 7, 2009">Back to top link with jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/28/open-link-in-a-new-window-using-jquery/" rel="bookmark" title="April 28, 2009">Open link in a new window using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/17/dropdown-menu-population-using-json-and-jquery/" rel="bookmark" title="July 17, 2009">Dropdown menu population using JSON and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/04/21/troubleshooting-jquery-get-cache-issue-in-internet-explorer/" rel="bookmark" title="April 21, 2010">Troubleshooting jQuery.get() Cache issue in Internet Explorer</a></li>
</ul><!-- Similar Posts took 23.803 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>Following are 10 Useful jQuery snippets for any website.   To use these snippets, you must include <a href="http://jquery.com/">jQuery library</a> in your page first and then add the snippets inside DOM ready function as follow:</p>
<p><em>$(document).ready(function() {<br />
   // add your snippets here<br />
});</em></p>
<p><strong>1. Display Warning Message for IE 6 Users</strong></p>
<pre>if ( (jQuery.browser.msie) &amp;&amp; (parseInt(jQuery.browser.version) &lt; 7) ) {
	$('body').prepend('&lt;div class=&quot;warning&quot;&gt;You are using an old version of Internet Explorer which is not supported.  Please upgrade your browser in order to view this website.&lt;/div&gt;');
}</pre>
<p><strong>2. Add hasJS class to body tag when Javascript is enabled</strong></p>
<pre>$('body').addClass('hasJS');</pre>
<p><strong>3. Clear default text in input fields on click</strong></p>
<p>Sample Usage: </p>
<pre>&lt;input type=&quot;text&quot; name=&quot;search&quot; class=&quot;search&quot; value=&quot;Keywords&quot; title=&quot;Keywords&quot; /&gt;</pre>
<pre>$('input[type=text]').focus(function() {
    var title = $(this).attr('title');
    if ($(this).val() == title) {
        $(this).val('');
    }
}).blur(function() {
    var title = $(this).attr('title');
    if ($(this).val() == '') {
        $(this).val(title);
    }
});</pre>
<p><strong>4. Show/hide more content on click</strong></p>
<p>Sample Usage:</p>
<pre>&lt;p&gt;&lt;a href=&quot;#how-to&quot; class=&quot;toggle&quot;&gt;How to write a good article?&lt;/a&gt;&lt;/p&gt;</pre>
<pre>&lt;div id=&quot;how-to&quot;&gt;
	How to tips go here.
&lt;/div&gt;
</pre>
<pre>
$('a.toggle').toggle(function() {
	var id = $(this).attr(&quot;href&quot;);
	$(this).addClass(&quot;active&quot;);
	$(id).slideDown();
}, function() {
	var id = $(this).attr(&quot;href&quot;);
	$(this).removeClass(&quot;active&quot;);
	$(id).slideUp();
});
</pre>
<p><strong>5. Open Print dialog</strong></p>
<p>Sample Usage:</p>
<pre>&lt;a href=&quot;#&quot; class=&quot;print&quot;&gt;Print this page&lt;/a&gt;</pre>
<pre>
$('a.print').click(function(){
	window.print();
	return false;
});
</pre>
<p><strong>6. Add &#8220;hover&#8221; class to table data (and change the background color of the class via CSS)</strong></p>
<pre>
$('table').delegate('td', 'hover', function(){
	$(this).toggleClass('hover');
});
</pre>
<p><strong>7. Open link in a new window if rel is set to external</strong></p>
<p>Sample Usage:</p>
<pre>&lt;a href=&quot;http://www.google.com&quot; rel=&quot;external&quot;&gt;Google&lt;/a&gt;</pre>
<pre>$('a[rel=external]').attr('target', '_blank');</pre>
<p><strong>8. Add &#8220;odd&#8221; class to alternate table row (and change the background color of the class via CSS to have stripes effect for table)</strong></p>
<pre>$('tr:odd').addClass('odd');  </pre>
<p><strong>9. Check if div exists on page</strong></p>
<pre>if ( $('#myDiv').length ) {
    // do something with myDiv
}</pre>
<p><strong>10. Check/Uncheck all checkboxes</strong></p>
<p>Sample Usage:</p>
<pre>
&lt;div class=&quot;options&quot;&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;select-all&quot;&gt;Select All&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;reset-all&quot;&gt;Reset All&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;

	&lt;input type=&quot;checkbox&quot; id=&quot;option1&quot; /&gt;&lt;label for=&quot;option1&quot;&gt;Option 1&lt;/label&gt;
	&lt;input type=&quot;checkbox&quot; id=&quot;option2&quot; /&gt;&lt;label for=&quot;option2&quot;&gt;Option 2&lt;/label&gt;
	&lt;input type=&quot;checkbox&quot; id=&quot;option3&quot; /&gt;&lt;label for=&quot;option3&quot;&gt;Option 3&lt;/label&gt;
	&lt;input type=&quot;checkbox&quot; id=&quot;option4&quot; /&gt;&lt;label for=&quot;option4&quot;&gt;Option 4&lt;/label&gt;
&lt;/div&gt;
</pre>
<pre>
$('.select-all').live('click', function(){
	$(this).closest('.options').find('input[type=checkbox]').attr('checked', true);
	return false;
});

$('.reset-all').live('click', function(){
	$(this).closest('.options').find('input[type=checkbox]').attr('checked', false);
	return false;
});</pre>
<p>Read <a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/">10 Useful jQuery Snippets</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/02/20/store-login-information-in-cookie-using-jquery/" rel="bookmark" title="February 20, 2009">Store login information in cookie using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/06/17/clear-default-text-in-input-boxes-on-click-with-jquery/" rel="bookmark" title="June 17, 2010">Clear default text in input boxes on click with jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/28/check-username-availability-using-ajax-and-jquery/" rel="bookmark" title="May 28, 2009">Check username availability using AJAX and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/07/back-to-top-link-with-jquery/" rel="bookmark" title="April 7, 2009">Back to top link with jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/28/open-link-in-a-new-window-using-jquery/" rel="bookmark" title="April 28, 2009">Open link in a new window using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/17/dropdown-menu-population-using-json-and-jquery/" rel="bookmark" title="July 17, 2009">Dropdown menu population using JSON and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/04/21/troubleshooting-jquery-get-cache-issue-in-internet-explorer/" rel="bookmark" title="April 21, 2010">Troubleshooting jQuery.get() Cache issue in Internet Explorer</a></li>
</ul><!-- Similar Posts took 7.616 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Clear default text in input boxes on click with jQuery</title>
		<link>http://eisabainyo.net/weblog/2010/06/17/clear-default-text-in-input-boxes-on-click-with-jquery/</link>
		<comments>http://eisabainyo.net/weblog/2010/06/17/clear-default-text-in-input-boxes-on-click-with-jquery/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 02:56:46 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1548</guid>
		<description><![CDATA[The following Javascript will clear default text value in input boxes when you click on them.  To trigger the Javascript, you&#8217;ll need to specify both title and value attributes and set class of the input field to &#8220;text&#8221;.  jQuery library is required for this to work.  
Javascript

$('.text').focus(function () {
	if ($(this).val() == $(this).attr("title")) [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/06/17/clear-default-text-in-input-boxes-on-click-with-jquery/">Clear default text in input boxes on click with jQuery</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/" rel="bookmark" title="September 1, 2010">10 Useful jQuery Snippets</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/20/store-login-information-in-cookie-using-jquery/" rel="bookmark" title="February 20, 2009">Store login information in cookie using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/23/customising-recaptcha-theme/" rel="bookmark" title="July 23, 2009">Customising reCAPTCHA Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/28/check-username-availability-using-ajax-and-jquery/" rel="bookmark" title="May 28, 2009">Check username availability using AJAX and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/" rel="bookmark" title="May 29, 2010">Click to copy and open site script</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/17/dropdown-menu-population-using-json-and-jquery/" rel="bookmark" title="July 17, 2009">Dropdown menu population using JSON and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/19/fieldset-and-legend-bug-in-ie8/" rel="bookmark" title="May 19, 2009">Fieldset and Legend bug in IE8</a></li>
</ul><!-- Similar Posts took 11.028 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>The following Javascript will clear default text value in input boxes when you click on them.  To trigger the Javascript, you&#8217;ll need to specify both title and value attributes and set class of the input field to &#8220;text&#8221;.  jQuery library is required for this to work.  </p>
<p><strong>Javascript</strong></p>
<pre>
$('.text').focus(function () {
	if ($(this).val() == $(this).attr("title")) {
		$(this).val("");
	}
}).blur(function () {
	if ($(this).val() == "") {
		$(this).val($(this).attr("title"));
	}
});
</pre>
<p>Examples: </p>
<pre>
&lt;input type=&quot;text&quot; name=&quot;q&quot; class=&quot;q text&quot; value=&quot;Search for terms&quot; title=&quot;Search for terms&quot; /&gt;

&lt;input type=&quot;password&quot; name=&quot;password&quot; class=&quot;text&quot; value=&quot;Password&quot; title=&quot;Password&quot;  /&gt;
</pre>
<p>Read <a href="http://eisabainyo.net/weblog/2010/06/17/clear-default-text-in-input-boxes-on-click-with-jquery/">Clear default text in input boxes on click with jQuery</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/" rel="bookmark" title="September 1, 2010">10 Useful jQuery Snippets</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/20/store-login-information-in-cookie-using-jquery/" rel="bookmark" title="February 20, 2009">Store login information in cookie using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/23/customising-recaptcha-theme/" rel="bookmark" title="July 23, 2009">Customising reCAPTCHA Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/28/check-username-availability-using-ajax-and-jquery/" rel="bookmark" title="May 28, 2009">Check username availability using AJAX and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/" rel="bookmark" title="May 29, 2010">Click to copy and open site script</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/17/dropdown-menu-population-using-json-and-jquery/" rel="bookmark" title="July 17, 2009">Dropdown menu population using JSON and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/19/fieldset-and-legend-bug-in-ie8/" rel="bookmark" title="May 19, 2009">Fieldset and Legend bug in IE8</a></li>
</ul><!-- Similar Posts took 7.914 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/06/17/clear-default-text-in-input-boxes-on-click-with-jquery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Click to copy and open site script</title>
		<link>http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/</link>
		<comments>http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/#comments</comments>
		<pubDate>Sat, 29 May 2010 11:08:08 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1463</guid>
		<description><![CDATA[I needed a script that copies a text (in my case, coupon code) onto clipboard and then open the web address associated with the coupon in a new window for my Coupons for Webmasters page.   For the clipboard copying, I&#8217;m using ZeroClipboard script written by Joseph Huckaby.  ZeroClipboard is a free and [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/">Click to copy and open site script</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/02/20/display-thickbox-on-page-load/" rel="bookmark" title="February 20, 2009">Display thickbox on page load</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/23/customising-recaptcha-theme/" rel="bookmark" title="July 23, 2009">Customising reCAPTCHA Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/06/17/clear-default-text-in-input-boxes-on-click-with-jquery/" rel="bookmark" title="June 17, 2010">Clear default text in input boxes on click with jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/20/store-login-information-in-cookie-using-jquery/" rel="bookmark" title="February 20, 2009">Store login information in cookie using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/27/code-to-embed-google-map-and-street-view/" rel="bookmark" title="April 27, 2009">Code to embed Google Map and Street View</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>
</ul><!-- Similar Posts took 16.603 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>I needed a script that copies a text (in my case, coupon code) onto clipboard and then open the web address associated with the coupon in a new window for my <a href="http://eisabainyo.net/website-templates/coupons-for-webmasters/">Coupons for Webmasters</a> page.   For the clipboard copying, I&#8217;m using <a href="http://code.google.com/p/zeroclipboard/">ZeroClipboard script written by Joseph Huckaby</a>.  ZeroClipboard is a free and open source library that provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie, and a JavaScript interface.  And opening a new window was easier than I thought, with jQuery and a bit of googling.  </p>
<p><strong>HTML Code</strong></p>
<pre>
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Zero Clipboard Test&lt;/title&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;ZeroClipboard.js&quot;&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;clipboard.js&quot;&gt;&lt;/script&gt;

&lt;/head&gt;
&lt;body &gt;
&lt;h1&gt;Zero Clipboard Test&lt;/h1&gt;

&lt;div class=&quot;coupon&quot;&gt;
&lt;h3&gt;Hostgator Hosting Coupon&lt;/h3&gt;
&lt;div class=&quot;desc&quot;&gt;20% off all plans for new customers&lt;/div&gt;
&lt;div class=&quot;expiry&quot;&gt;Expiry date: - &lt;/div&gt;
&lt;div class=&quot;coupon-code&quot; rel=&quot;http://eisabainyo.net/view/hostgator&quot;&gt;GREEN&lt;/div&gt;
&lt;div class=&quot;coupon-link&quot;&gt;Click to copy&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;coupon&quot;&gt;
&lt;h3&gt;Godaddy Domain Name Coupon&lt;/h3&gt;
&lt;div class=&quot;desc&quot;&gt;$7.49 for any .COM domain&lt;/div&gt;
&lt;div class=&quot;expiry&quot;&gt;Expiry date: - &lt;/div&gt;
&lt;div class=&quot;coupon-code&quot; rel=&quot;http://eisabainyo.net/view/godaddy&quot;&gt;OYH7&lt;/div&gt;
&lt;div class=&quot;coupon-link&quot;&gt;Click to copy&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;coupon&quot;&gt;
&lt;h3&gt;Website Templates&lt;/h3&gt;
&lt;div class=&quot;desc&quot;&gt;5% off any template (no coupon required)&lt;/div&gt;
&lt;div class=&quot;expiry&quot;&gt;Expiry date: 10 June 2010 &lt;/div&gt;
&lt;div class=&quot;coupon-link&quot;&gt;&lt;a href=&quot;http://eisabainyo.net/website-templates&quot; target=&quot;_blank&quot;&gt;Go to site&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><strong>ZeroClipboard Script </strong>(<a href="http://code.google.com/p/zeroclipboard/">download at Google Code</a>)<br />
You&#8217;ll need ZeroClipboard.js and ZeroClipboard.swf.  </p>
<p><strong>clipboard.js</strong></p>
<pre>
ZeroClipboard.setMoviePath("http://fullpath.to.your.site/ZeroClipboard.swf");

var clip = null;
var url = '';

function init() {
	clip = new ZeroClipboard.Client();
	clip.setHandCursor( true );

	$('.coupon-code').mouseover( function() {
		clip.setText(this.innerHTML);
		if (clip.div) {
			clip.receiveEvent('mouseout', null);
			clip.reposition(this);
		} else {
                        clip.glue(this);
                }
		clip.receiveEvent('mouseover', null);
		url = $(this).attr('rel');
	});

	clip.addEventListener('mouseUp', function(client) {
		window.open(url);
	});
}

$(document).ready(function() {
	init();
});
</pre>
<p>See the code in action at <a href="http://eisabainyo.net/website-templates/coupons-for-webmasters/">Coupons for Webmasters</a>. <a href="http://www.retailmenot.com/">RetailMeNot</a> is also using a similar script to achieve the same result.  </p>
<p>Read <a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/">Click to copy and open site script</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/02/20/display-thickbox-on-page-load/" rel="bookmark" title="February 20, 2009">Display thickbox on page load</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/23/customising-recaptcha-theme/" rel="bookmark" title="July 23, 2009">Customising reCAPTCHA Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/06/17/clear-default-text-in-input-boxes-on-click-with-jquery/" rel="bookmark" title="June 17, 2010">Clear default text in input boxes on click with jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/20/store-login-information-in-cookie-using-jquery/" rel="bookmark" title="February 20, 2009">Store login information in cookie using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/27/code-to-embed-google-map-and-street-view/" rel="bookmark" title="April 27, 2009">Code to embed Google Map and Street View</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>
</ul><!-- Similar Posts took 8.820 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to check if div exists in jQuery</title>
		<link>http://eisabainyo.net/weblog/2010/05/07/how-to-check-if-div-exists-in-jquery/</link>
		<comments>http://eisabainyo.net/weblog/2010/05/07/how-to-check-if-div-exists-in-jquery/#comments</comments>
		<pubDate>Fri, 07 May 2010 03:42:02 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1435</guid>
		<description><![CDATA[This is one of the most commonly used piece of code for jQuery.  Often times, we need to check if a div/element exists in the page before processing a block of script (eg: replacing the content of the div). 

if ( $("#message").length ) {
  $('#message').text("Hello!");
}

<p>Read <a href="http://eisabainyo.net/weblog/2010/05/07/how-to-check-if-div-exists-in-jquery/">How to check if div exists in jQuery</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/02/20/display-thickbox-on-page-load/" rel="bookmark" title="February 20, 2009">Display thickbox on page load</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/03/18/10-website-optimisation-tips-for-web-20-websites/" rel="bookmark" title="March 18, 2009">10 Website Optimisation Tips for Web 2.0 Websites</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/28/check-username-availability-using-ajax-and-jquery/" rel="bookmark" title="May 28, 2009">Check username availability using AJAX and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/" rel="bookmark" title="May 29, 2010">Click to copy and open site script</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/" rel="bookmark" title="September 1, 2010">10 Useful jQuery Snippets</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/06/30/display-a-download-dialog-for-pdf-in-php/" rel="bookmark" title="June 30, 2009">Display a download dialog for pdf in PHP</a></li>
</ul><!-- Similar Posts took 145.564 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>This is one of the most commonly used piece of code for jQuery.  Often times, we need to check if a div/element exists in the page before processing a block of script (eg: replacing the content of the div). </p>
<pre>
if ( $("#message").length ) {
  $('#message').text("Hello!");
}
</pre>
<p>Read <a href="http://eisabainyo.net/weblog/2010/05/07/how-to-check-if-div-exists-in-jquery/">How to check if div exists in jQuery</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/02/20/display-thickbox-on-page-load/" rel="bookmark" title="February 20, 2009">Display thickbox on page load</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/03/18/10-website-optimisation-tips-for-web-20-websites/" rel="bookmark" title="March 18, 2009">10 Website Optimisation Tips for Web 2.0 Websites</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/28/check-username-availability-using-ajax-and-jquery/" rel="bookmark" title="May 28, 2009">Check username availability using AJAX and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/" rel="bookmark" title="May 29, 2010">Click to copy and open site script</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/" rel="bookmark" title="September 1, 2010">10 Useful jQuery Snippets</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/06/30/display-a-download-dialog-for-pdf-in-php/" rel="bookmark" title="June 30, 2009">Display a download dialog for pdf in PHP</a></li>
</ul><!-- Similar Posts took 8.674 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/05/07/how-to-check-if-div-exists-in-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Align an image in center and middle using CSS</title>
		<link>http://eisabainyo.net/weblog/2010/04/22/align-an-image-in-center-and-middle-using-css/</link>
		<comments>http://eisabainyo.net/weblog/2010/04/22/align-an-image-in-center-and-middle-using-css/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 02:02:22 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1410</guid>
		<description><![CDATA[Here&#8217;s a snippet of CSS and HTML code that aligns an image in center (horizontally) and middle (vertically).  Tested in Firefox, IE, Chrome and Safari.  

CSS
#enter {
	position: absolute;
	text-align: center;
	left: 50%;
	top: 50%;
	margin: -120px auto 0 -130px; /* value of top margin: height of the image divide by 2 (ie: 240 / 2), value of [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/04/22/align-an-image-in-center-and-middle-using-css/">Align an image in center and middle using CSS</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/09/how-to-style-a-submit-button-in-css-example-2/" rel="bookmark" title="March 9, 2010">How to style a Submit button in CSS &#8211; Example 2</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/24/how-to-style-a-submit-button-in-css/" rel="bookmark" title="April 24, 2009">How to style a Submit button in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2005/12/26/transitional-vs-strict/" rel="bookmark" title="December 26, 2005">Transitional vs. Strict</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/02/some-simple-but-effective-css-rules-for-ie-6/" rel="bookmark" title="July 2, 2009">Some simple but effective CSS rules for IE 6</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/" rel="bookmark" title="May 31, 2010">How to code an HTML Email Newsletter</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>
</ul><!-- Similar Posts took 35.702 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a snippet of CSS and HTML code that aligns an image in center (horizontally) and middle (vertically).  Tested in Firefox, IE, Chrome and Safari.  </p>
<p><img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/04/image-in-center-middle.gif" alt="" title="Image in center and middle" width="350" class="alignnone size-full wp-image-1412" /></p>
<p><strong>CSS</strong></p>
<pre>#enter {
	position: absolute;
	text-align: center;
	left: 50%;
	top: 50%;
	margin: -120px auto 0 -130px; /* value of top margin: height of the image divide by 2 (ie: 240 / 2), value of left margin: width of the image divide by 2 (ie: 260 / 2) */
	width: 260px; /* same as the image width */
}

#enter span a {
	display: block;
	width: 260px;
	height: 240px;
	margin: 0 auto;
	position: relative;
	background: transparent url(images/enter.jpg) 0 0 no-repeat;
	text-indent: -5000em;
	outline: 0;
}</pre>
<p><strong>HTML</strong></p>
<pre>&lt;body id=&quot;homepage&quot;&gt;
    &lt;div id=&quot;enter&quot;&gt;
	&lt;span&gt;&lt;a href=&quot;/home&quot;&gt;Enter Site&lt;/a&gt;&lt;/span&gt;
    &lt;/div&gt;
&lt;/body&gt;</pre>
<p>Read <a href="http://eisabainyo.net/weblog/2010/04/22/align-an-image-in-center-and-middle-using-css/">Align an image in center and middle using CSS</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/09/how-to-style-a-submit-button-in-css-example-2/" rel="bookmark" title="March 9, 2010">How to style a Submit button in CSS &#8211; Example 2</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/24/how-to-style-a-submit-button-in-css/" rel="bookmark" title="April 24, 2009">How to style a Submit button in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2005/12/26/transitional-vs-strict/" rel="bookmark" title="December 26, 2005">Transitional vs. Strict</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/02/some-simple-but-effective-css-rules-for-ie-6/" rel="bookmark" title="July 2, 2009">Some simple but effective CSS rules for IE 6</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/" rel="bookmark" title="May 31, 2010">How to code an HTML Email Newsletter</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>
</ul><!-- Similar Posts took 20.021 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/04/22/align-an-image-in-center-and-middle-using-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting jQuery.get() Cache issue in Internet Explorer</title>
		<link>http://eisabainyo.net/weblog/2010/04/21/troubleshooting-jquery-get-cache-issue-in-internet-explorer/</link>
		<comments>http://eisabainyo.net/weblog/2010/04/21/troubleshooting-jquery-get-cache-issue-in-internet-explorer/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 06:10:16 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1398</guid>
		<description><![CDATA[There is an issue with jQuery.get() in Internet Explorer when trying to update content on the fly because IE caches XMLHttpRequest response and the AJAX call made via jQuery.get() is therefore always returning the same result.   I encountered this problem when I was writing a function similar to facebook Like feature where the [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/04/21/troubleshooting-jquery-get-cache-issue-in-internet-explorer/">Troubleshooting jQuery.get() Cache issue in Internet Explorer</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/04/07/back-to-top-link-with-jquery/" rel="bookmark" title="April 7, 2009">Back to top link with jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/17/dropdown-menu-population-using-json-and-jquery/" rel="bookmark" title="July 17, 2009">Dropdown menu population using JSON and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/28/open-link-in-a-new-window-using-jquery/" rel="bookmark" title="April 28, 2009">Open link in a new window using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/23/customising-recaptcha-theme/" rel="bookmark" title="July 23, 2009">Customising reCAPTCHA Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/" rel="bookmark" title="September 1, 2010">10 Useful jQuery Snippets</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/28/check-username-availability-using-ajax-and-jquery/" rel="bookmark" title="May 28, 2009">Check username availability using AJAX and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/" rel="bookmark" title="May 29, 2010">Click to copy and open site script</a></li>
</ul><!-- Similar Posts took 15.972 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>There is an issue with <a href="http://api.jquery.com/jQuery.get/">jQuery.get()</a> in Internet Explorer when trying to update content on the fly because IE caches XMLHttpRequest response and the AJAX call made via jQuery.get() is therefore always returning the same result.   I encountered this problem when I was writing a function similar to facebook Like feature where the Like counter increments by 1 whenever someone clicks on the I like it link.  It works all fine and well on Firefox, but when I tested it on IE, the counter doesn&#8217;t increase as expected.  </p>
<p>To solve the issue, I added a parameter to the request URL that is unique for each request by using Javascript getTime function.  Javascript getTime function returns the number of milliseconds since January 1, 1970. This prevents IE from returning the same/cached response because the request URL is always unique.  </p>
<p><strong>Javascript</strong></p>
<pre>jQuery.fn.likeIt = function() {
    var r = new Date().getTime(); // unique random number to workaround IE cache issue
    $("a", this).click(function() {
        // Note: my href already has a parameter which is why I have &amp; instead of ? before the r parameter
	$.get($(this).attr("href") + "&#038;r=" + r, function(data) {
             // do your processing here
	}); // $.get
    return false;
    });
};</pre>
<p>Read <a href="http://eisabainyo.net/weblog/2010/04/21/troubleshooting-jquery-get-cache-issue-in-internet-explorer/">Troubleshooting jQuery.get() Cache issue in Internet Explorer</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/04/07/back-to-top-link-with-jquery/" rel="bookmark" title="April 7, 2009">Back to top link with jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/17/dropdown-menu-population-using-json-and-jquery/" rel="bookmark" title="July 17, 2009">Dropdown menu population using JSON and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/28/open-link-in-a-new-window-using-jquery/" rel="bookmark" title="April 28, 2009">Open link in a new window using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/23/customising-recaptcha-theme/" rel="bookmark" title="July 23, 2009">Customising reCAPTCHA Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/" rel="bookmark" title="September 1, 2010">10 Useful jQuery Snippets</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/28/check-username-availability-using-ajax-and-jquery/" rel="bookmark" title="May 28, 2009">Check username availability using AJAX and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/" rel="bookmark" title="May 29, 2010">Click to copy and open site script</a></li>
</ul><!-- Similar Posts took 15.058 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/04/21/troubleshooting-jquery-get-cache-issue-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Display 5 latest posts in each category in WordPress</title>
		<link>http://eisabainyo.net/weblog/2010/03/10/display-5-latest-posts-in-each-category-in-wordpress/</link>
		<comments>http://eisabainyo.net/weblog/2010/03/10/display-5-latest-posts-in-each-category-in-wordpress/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 12:34:24 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1285</guid>
		<description><![CDATA[To display 5 latest posts in each parent category of your WordPress blog, add the following code into the template that you want the result to appear.   In our case, we added the following code into our 404 template page (404.php of current theme).  Other places that you might want to display [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/03/10/display-5-latest-posts-in-each-category-in-wordpress/">Display 5 latest posts in each category in WordPress</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2007/05/14/customising-categoryphp-in-wordpress/" rel="bookmark" title="May 14, 2007">Customising category.php in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/09/display-10-recent-post-titles-on-homepage/" rel="bookmark" title="February 9, 2009">Display 10 recent post titles on homepage</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/02/22/how-to-create-a-archive-page-in-wordpress/" rel="bookmark" title="February 22, 2010">5 steps to creating a custom Archive page in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/02/a-list-of-all-posts-in-an-alphabetical-order/" rel="bookmark" title="February 2, 2009">A list of all posts in an alphabetical order</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/26/highlight-the-current-page-link-in-wordpress/" rel="bookmark" title="May 26, 2009">Highlight the current page link in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/11/24/how-to-add-a-breadcrumb-to-your-blog-and-have-it-appear-on-googles-search-result-snippet/" rel="bookmark" title="November 24, 2009">How to add a breadcrumb to your blog and have it appear on Google&#8217;s Search Result Snippet</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/26/wordpress-iphone-app-a-step-by-step-user-guide-to-using-wordpress-for-iphone/" rel="bookmark" title="March 26, 2010">WordPress iPhone App &#8211; a step by step user guide to using WordPress for iPhone</a></li>
</ul><!-- Similar Posts took 48.449 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>To display 5 latest posts in each parent category of your WordPress blog, add the following code into the template that you want the result to appear.   In our case, we added the following code into our <a href="http://eisabainyo.net/weblog/404">404</a> template page (404.php of current theme).  Other places that you might want to display a list of posts by category are: 1) Footer, 2) <a href="http://eisabainyo.net/weblog/archive/">WordPress Custom Archive Page</a>, 3) <a href="http://eisabainyo.net/weblog/search/">WordPress Custom Search Page</a>, 4) WordPress Landing Page and so on. </p>
<p><img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/03/404-wide.gif" alt="" title="Screenshot of 404 page with a list of posts by category" width="400" height="276" class="alignnone size-full wp-image-1286" /><br />
<small>Screenshot of 404 page with a list of posts by category (Wide View)</small></p>
<p><img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/03/404-narrow.gif" alt="" title="Screenshot of 404 page with a list of posts by category" width="330" class="alignnone size-full wp-image-1292" /><br />
<small>Screenshot of 404 page with a list of posts by category (Narrow View)</small></p>
<p><strong>WordPress PHP Code</strong></p>
<pre>&lt;div id=&quot;page-not-found&quot; class=&quot;post-page&quot;&gt;

&lt;?php
$cat_args = array(
  'orderby' =&gt; 'name',
  'order' =&gt; 'ASC',
  'child_of' =&gt; 0
);

$categories =   get_categories($cat_args); 

foreach($categories as $category) {
    echo '&lt;dl&gt;';
    echo '&lt;dt&gt; &lt;a href=&quot;' . get_category_link( $category-&gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&gt;name ) . '&quot; ' . '&gt;' . $category-&gt;name.'&lt;/a&gt;&lt;/dt&gt;';

     $post_args = array(
      'numberposts' =&gt; 5,
      'category' =&gt; $category-&gt;term_id
    );

    $posts = get_posts($post_args);

	foreach($posts as $post) {
	?&gt;
		&lt;dd&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/dd&gt;
	&lt;?php
	}
	echo '&lt;dd class=&quot;view-all&quot;&gt; &lt;a href=&quot;' . get_category_link( $category-&gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&gt;name ) . '&quot; ' . '&gt;View all posts in ' . $category-&gt;name.'&lt;/a&gt;&lt;/dd&gt;';
	echo '&lt;/dl&gt;';
}
?&gt;
&lt;div class=&quot;page-end&quot;&gt;&lt;!-- --&gt;&lt;/div&gt;

&lt;/div&gt;
</pre>
<p><strong>CSS</strong></p>
<pre>
#page-not-found dl {
width: 200px;
float: left;
padding: 0 18px 0 0;
height: 250px;
}

#page-not-found dt {
font-weight: bold;
font-size: 1.1em;
padding: 10px 0;
}

#page-not-found dt a {
color: #b0bf32;
}

#page-not-found dd.view-all {
border-top: 1px solid #c9c9c9;
font-size: 0.9em;
margin: 5px 0;
padding: 2px 0 0;
text-align: right;
}

#page-not-found dd.view-all a {
color: #999;
}

.page-end {
clear: both;
}
</pre>
<p>Read <a href="http://eisabainyo.net/weblog/2010/03/10/display-5-latest-posts-in-each-category-in-wordpress/">Display 5 latest posts in each category in WordPress</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2007/05/14/customising-categoryphp-in-wordpress/" rel="bookmark" title="May 14, 2007">Customising category.php in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/09/display-10-recent-post-titles-on-homepage/" rel="bookmark" title="February 9, 2009">Display 10 recent post titles on homepage</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/02/22/how-to-create-a-archive-page-in-wordpress/" rel="bookmark" title="February 22, 2010">5 steps to creating a custom Archive page in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/02/a-list-of-all-posts-in-an-alphabetical-order/" rel="bookmark" title="February 2, 2009">A list of all posts in an alphabetical order</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/26/highlight-the-current-page-link-in-wordpress/" rel="bookmark" title="May 26, 2009">Highlight the current page link in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/11/24/how-to-add-a-breadcrumb-to-your-blog-and-have-it-appear-on-googles-search-result-snippet/" rel="bookmark" title="November 24, 2009">How to add a breadcrumb to your blog and have it appear on Google&#8217;s Search Result Snippet</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/26/wordpress-iphone-app-a-step-by-step-user-guide-to-using-wordpress-for-iphone/" rel="bookmark" title="March 26, 2010">WordPress iPhone App &#8211; a step by step user guide to using WordPress for iPhone</a></li>
</ul><!-- Similar Posts took 9.991 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/03/10/display-5-latest-posts-in-each-category-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to style a Submit button in CSS &#8211; Example 2</title>
		<link>http://eisabainyo.net/weblog/2010/03/09/how-to-style-a-submit-button-in-css-example-2/</link>
		<comments>http://eisabainyo.net/weblog/2010/03/09/how-to-style-a-submit-button-in-css-example-2/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 01:31:06 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[xHTML]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1238</guid>
		<description><![CDATA[
web 2.0 style call-to-action buttons can be purchased in psd format from graphic river
Since writing How to style a Submit button in CSS a few months ago, I have found an alternative way to achieve the same result.   In this example, we will be using &#60;button&#62; tag instead of &#60;input&#62; tag.   [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/03/09/how-to-style-a-submit-button-in-css-example-2/">How to style a Submit button in CSS &#8211; Example 2</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/04/24/how-to-style-a-submit-button-in-css/" rel="bookmark" title="April 24, 2009">How to style a Submit button in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/04/22/align-an-image-in-center-and-middle-using-css/" rel="bookmark" title="April 22, 2010">Align an image in center and middle using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/19/fieldset-and-legend-bug-in-ie8/" rel="bookmark" title="May 19, 2009">Fieldset and Legend bug in IE8</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/06/30/change-the-arrow-into-a-hand-when-hovering-over-submit-button/" rel="bookmark" title="June 30, 2009">Change the arrow into a hand when hovering over &#8216;Submit&#8217; button</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/02/some-simple-but-effective-css-rules-for-ie-6/" rel="bookmark" title="July 2, 2009">Some simple but effective CSS rules for IE 6</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/" rel="bookmark" title="May 31, 2010">How to code an HTML Email Newsletter</a></li>
</ul><!-- Similar Posts took 22.741 ms --></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/03/contact-us-today.gif" alt="" title="Contact us today!" width="247" height="86" class="alignnone size-full wp-image-1241" /><br />
<small><a href="http://graphicriver.net/item/premium-web-20-call-to-action-buttons/80703?ref=eisabai" target="_blank">web 2.0 style call-to-action buttons</a> can be purchased in psd format from graphic river</small></p>
<p>Since writing <a href="http://eisabainyo.net/weblog/2009/04/24/how-to-style-a-submit-button-in-css/">How to style a Submit button in CSS</a> a few months ago, I have found an alternative way to achieve the same result.   In this example, we will be using <code>&lt;button&gt;</code> tag instead of <code>&lt;input&gt;</code> tag.    The <code>&lt;button&gt;</code> tag will still submit the form that it belongs to when clicked because the type of the button is set as <code>submit</code>.  </p>
<p><strong>HTML</strong></p>
<pre>&lt;button id=&quot;button&quot; name=&quot;button&quot; type=&quot;submit&quot;&gt;
&lt;span&gt;Contact us today!&lt;/span&gt;&lt;/button&gt;</pre>
<p><strong>CSS</strong></p>
<pre>#button {
	background: transparent url(contact.gif) 0 0 no-repeat;
	border: none;
	cursor: pointer;
	width: 180px;
	height: 50px;
}

#button span {
	display: none;
}</pre>
<p>Read <a href="http://eisabainyo.net/weblog/2010/03/09/how-to-style-a-submit-button-in-css-example-2/">How to style a Submit button in CSS &#8211; Example 2</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/04/24/how-to-style-a-submit-button-in-css/" rel="bookmark" title="April 24, 2009">How to style a Submit button in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/04/22/align-an-image-in-center-and-middle-using-css/" rel="bookmark" title="April 22, 2010">Align an image in center and middle using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/19/fieldset-and-legend-bug-in-ie8/" rel="bookmark" title="May 19, 2009">Fieldset and Legend bug in IE8</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/06/30/change-the-arrow-into-a-hand-when-hovering-over-submit-button/" rel="bookmark" title="June 30, 2009">Change the arrow into a hand when hovering over &#8216;Submit&#8217; button</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/02/some-simple-but-effective-css-rules-for-ie-6/" rel="bookmark" title="July 2, 2009">Some simple but effective CSS rules for IE 6</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/" rel="bookmark" title="May 31, 2010">How to code an HTML Email Newsletter</a></li>
</ul><!-- Similar Posts took 8.472 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/03/09/how-to-style-a-submit-button-in-css-example-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to disable text auto correction in iPhone web app</title>
		<link>http://eisabainyo.net/weblog/2010/03/05/how-to-disable-text-auto-correction-in-iphone-web-app/</link>
		<comments>http://eisabainyo.net/weblog/2010/03/05/how-to-disable-text-auto-correction-in-iphone-web-app/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 12:14:39 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1194</guid>
		<description><![CDATA[To turn off iPhone auto correction feature (predictive dictionary) on textboxes, add autocorrect="off" attribute to your input tag.  

&#60;input type=&#34;text&#34; id=&#34;keyword&#34; name=&#34;keyword&#34;
autocorrect=&#34;off&#34; /&#62;

You can also turn off auto capitalising/capitalizing feature by adding autocapitalize="off" attribute.

&#60;input type=&#34;text&#34; id=&#34;keyword&#34; name=&#34;keyword&#34;
autocorrect=&#34;off&#34; autocapitalize=&#34;off&#34; /&#62;

And lastly, you can turn off auto complete in a similar way.

&#60;input type=&#34;text&#34; id=&#34;keyword&#34; name=&#34;keyword&#34;
autocorrect=&#34;off&#34; autocapitalize=&#34;off&#34; [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/03/05/how-to-disable-text-auto-correction-in-iphone-web-app/">How to disable text auto correction in iPhone web app</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/06/12/making-a-website-iphone-friendly-using-css/" rel="bookmark" title="June 12, 2009">Making a website iPhone-friendly using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/10/27/tips-for-iphone-web-app-development/" rel="bookmark" title="October 27, 2009">Tips for iPhone Web App Development</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/06/17/clear-default-text-in-input-boxes-on-click-with-jquery/" rel="bookmark" title="June 17, 2010">Clear default text in input boxes on click with jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/23/customising-recaptcha-theme/" rel="bookmark" title="July 23, 2009">Customising reCAPTCHA Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/09/27/10-tips-i-have-learned-from-wds2007-day-1/" rel="bookmark" title="September 27, 2007">10 tips I have learned from WDS2007 &#8211; Day 1</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/11/15/building-mashups-for-the-society-mashup-australia-part-i/" rel="bookmark" title="November 15, 2009">Building mashups for the society (Mashup Australia) &#8211; Part I</a></li>
</ul><!-- Similar Posts took 17.389 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>To turn off iPhone auto correction feature (predictive dictionary) on textboxes, add <code>autocorrect="off"</code> attribute to your <code>input </code>tag.  </p>
<pre>
&lt;input type=&quot;text&quot; id=&quot;keyword&quot; name=&quot;keyword&quot;
autocorrect=&quot;off&quot; /&gt;
</pre>
<p>You can also turn off auto capitalising/capitalizing feature by adding <code>autocapitalize="off"</code> attribute.</p>
<pre>
&lt;input type=&quot;text&quot; id=&quot;keyword&quot; name=&quot;keyword&quot;
autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; /&gt;
</pre>
<p>And lastly, you can turn off auto complete in a similar way.</p>
<pre>
&lt;input type=&quot;text&quot; id=&quot;keyword&quot; name=&quot;keyword&quot;
autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; autocomplete=&quot;off&quot; /&gt;
</pre>
<p>More HTML tips for iPhone web apps can be found in <a href="http://www.amazon.com/gp/product/0596805780?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0596805780" target="_blank">Building iPhone Apps with HTML, CSS, and JavaScript</a><img src="http://www.assoc-amazon.com/e/ir?t=eisabainyonet-20&#038;l=as2&#038;o=1&#038;a=0596805780" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> book published by O&#8217;Reilly Media, Inc.</p>
<p>Read <a href="http://eisabainyo.net/weblog/2010/03/05/how-to-disable-text-auto-correction-in-iphone-web-app/">How to disable text auto correction in iPhone web app</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/06/12/making-a-website-iphone-friendly-using-css/" rel="bookmark" title="June 12, 2009">Making a website iPhone-friendly using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/10/27/tips-for-iphone-web-app-development/" rel="bookmark" title="October 27, 2009">Tips for iPhone Web App Development</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/06/17/clear-default-text-in-input-boxes-on-click-with-jquery/" rel="bookmark" title="June 17, 2010">Clear default text in input boxes on click with jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/23/customising-recaptcha-theme/" rel="bookmark" title="July 23, 2009">Customising reCAPTCHA Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/09/27/10-tips-i-have-learned-from-wds2007-day-1/" rel="bookmark" title="September 27, 2007">10 tips I have learned from WDS2007 &#8211; Day 1</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/11/15/building-mashups-for-the-society-mashup-australia-part-i/" rel="bookmark" title="November 15, 2009">Building mashups for the society (Mashup Australia) &#8211; Part I</a></li>
</ul><!-- Similar Posts took 9.356 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/03/05/how-to-disable-text-auto-correction-in-iphone-web-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 steps to creating a custom Archive page in WordPress</title>
		<link>http://eisabainyo.net/weblog/2010/02/22/how-to-create-a-archive-page-in-wordpress/</link>
		<comments>http://eisabainyo.net/weblog/2010/02/22/how-to-create-a-archive-page-in-wordpress/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 06:09:11 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1036</guid>
		<description><![CDATA[
Here is how to create a custom archive page in WordPress just like the one you see on our blog.  
1. Go to the current theme folder of your WordPress installation (wp-content/themes/*current theme*) and make sure you don&#8217;t already have archives.php in the folder
2. Create a new file called archives.php (or whatever file name [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/02/22/how-to-create-a-archive-page-in-wordpress/">5 steps to creating a custom Archive page in WordPress</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/02/02/a-list-of-all-posts-in-an-alphabetical-order/" rel="bookmark" title="February 2, 2009">A list of all posts in an alphabetical order</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/05/14/customising-categoryphp-in-wordpress/" rel="bookmark" title="May 14, 2007">Customising category.php in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/10/display-5-latest-posts-in-each-category-in-wordpress/" rel="bookmark" title="March 10, 2010">Display 5 latest posts in each category in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/26/highlight-the-current-page-link-in-wordpress/" rel="bookmark" title="May 26, 2009">Highlight the current page link in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/02/27/golden-green-wordpress-theme/" rel="bookmark" title="February 27, 2007">Golden Green WordPress Theme &#8211; Download</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/09/display-10-recent-post-titles-on-homepage/" rel="bookmark" title="February 9, 2009">Display 10 recent post titles on homepage</a></li>
</ul><!-- Similar Posts took 10.064 ms --></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/02/archive-page.gif" alt="" title="Archive" width="301" height="468" class="alignnone size-full wp-image-1108" /><br />
Here is how to create a custom archive page in WordPress just like <a href="http://eisabainyo.net/weblog/archive/">the one</a> you see on our blog.  </p>
<p>1. Go to the current theme folder of your WordPress installation (wp-content/themes/*current theme*) and make sure you don&#8217;t already have archives.php in the folder</p>
<p>2. Create a new file called archives.php (or whatever file name you want to give)</p>
<p>3. Copy and paste the following code into the new file and upload it to your current theme folder (wp-content/themes/*current theme*)</p>
<pre>
&lt;?php
/*
Template Name: Archives Page
*/
?&gt;

&lt;?php get_header(); ?&gt;

&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
&lt;div class=&quot;post-page&quot; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
&lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;
&lt;?php the_content('&lt;p class=&quot;serif&quot;&gt;Read the rest of this page &amp;raquo;&lt;/p&gt;'); ?&gt;

&lt;h2&gt;Archives by Title:&lt;/h2&gt;
&lt;ul&gt;
    &lt;?php wp_get_archives('type=alpha');?&gt;
&lt;/ul&gt;

&lt;h2&gt;Archives by Month:&lt;/h2&gt;
&lt;ul&gt;
    &lt;?php wp_get_archives('type=monthly'); ?&gt;
&lt;/ul&gt;

&lt;h2&gt;Archives by Subject:&lt;/h2&gt;
&lt;ul&gt;
    &lt;?php wp_list_categories('title_li='); ?&gt;
&lt;/ul&gt;

&lt;?php wp_link_pages(array('before' =&gt; '&lt;p&gt;&lt;strong&gt;Pages:&lt;/strong&gt; ', 'after' =&gt; '&lt;/p&gt;', 'next_or_number' =&gt; 'number')); ?&gt;
&lt;/div&gt;
&lt;?php endwhile; endif; ?&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<p>Note: You will probably need to modify this code a bit to match the code structure of your current theme.  For example, you might need to have get_sidebar() or you might have extra markup.  </p>
<p>4. Login to your WordPress Administrator Panel and create a new page (and name it whatever you like.  Ours is called &#8220;Archive&#8221;)</p>
<p>5. On the right side of the create/edit page, you will see Attributes section where you can specify settings for Parent, Template and Order.  Choose &#8220;Archives Page&#8221; for Template and publish/save your changes.  </p>
<p>You now have an Archive page for your WordPress blog that is similar to <a href="http://eisabainyo.net/weblog/archive/">our Archive page</a>.</p>
<p>Read <a href="http://eisabainyo.net/weblog/2010/02/22/how-to-create-a-archive-page-in-wordpress/">5 steps to creating a custom Archive page in WordPress</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/02/02/a-list-of-all-posts-in-an-alphabetical-order/" rel="bookmark" title="February 2, 2009">A list of all posts in an alphabetical order</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/05/14/customising-categoryphp-in-wordpress/" rel="bookmark" title="May 14, 2007">Customising category.php in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/10/display-5-latest-posts-in-each-category-in-wordpress/" rel="bookmark" title="March 10, 2010">Display 5 latest posts in each category in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/26/highlight-the-current-page-link-in-wordpress/" rel="bookmark" title="May 26, 2009">Highlight the current page link in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/02/27/golden-green-wordpress-theme/" rel="bookmark" title="February 27, 2007">Golden Green WordPress Theme &#8211; Download</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/09/display-10-recent-post-titles-on-homepage/" rel="bookmark" title="February 9, 2009">Display 10 recent post titles on homepage</a></li>
</ul><!-- Similar Posts took 7.626 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/02/22/how-to-create-a-archive-page-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
