<?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; CSS</title>
	<atom:link href="http://eisabainyo.net/weblog/category/css/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>Tue, 24 Jan 2012 08:29:05 +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>Introduction to CSS3 Animations by Examples</title>
		<link>http://eisabainyo.net/weblog/2011/06/28/introduction-to-css3-animations-by-examples/</link>
		<comments>http://eisabainyo.net/weblog/2011/06/28/introduction-to-css3-animations-by-examples/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 06:08:23 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1735</guid>
		<description><![CDATA[CSS3 animations are really easy to write once you know how they work. This post will show you some very basic animations done in CSS3.  Once you get the hang of how to put them together, you will be able to do more advanced animations in CSS3 based on these examples.  Also have [...]<p>Read <a href="http://eisabainyo.net/weblog/2011/06/28/introduction-to-css3-animations-by-examples/">Introduction to CSS3 Animations by Examples</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/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/11/opacity-in-css/" rel="bookmark" title="May 11, 2009">Opacity in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/02/19/web-20-star-burst-in-photoshop/" rel="bookmark" title="February 19, 2007">web 2.0 star burst in Photoshop</a></li>

<li><a href="http://eisabainyo.net/weblog/2008/12/25/removing-background-image-from-fckeditor-in-drupal/" rel="bookmark" title="December 25, 2008">Removing background image from FCKEditor in Drupal</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/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/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/" rel="bookmark" title="January 31, 2011">Top 10 jQuery Mobile Code Snippets that you need to know</a></li>
</ul><!-- Similar Posts took 206.244 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>CSS3 animations are really easy to write once you know how they work. This post will show you some very basic animations done in CSS3.  Once you get the hang of how to put them together, you will be able to do more advanced animations in CSS3 based on these examples.  Also have a look at <a href="http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariCSSRef/Articles/Functions.html">Reference on Safari</a> for the animation properties that you can use on your CSS selectors.  </p>
<p>Note: The examples on this page will only work on WebKit Browsers (eg: Chrome, Safari).   Hover over the little black elements to see the effect done in pure CSS3.  </p>
<style>
	.css3demodiv pre, .css3demodiv .pleaseshare { width: 100%; display: block; clear: both; }
	ul.css3demo li { -webkit-border-radius: 15px; display: block; float: left; width: 50px; height: 50px; margin: 10px; background: #000; color: #fff; text-indent: -5000em; cursor: pointer; }
	ul.css3demo1 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo1 li:hover {  -webkit-transform:  rotate3d(0, 0, 0, 25deg); -webkit-transform-style: preserve-3d; }
	ul.css3demo2 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo2 li:hover { -webkit-transform:  translate3d(0, 40px, 0); }
	ul.css3demo3 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo3 li:hover {  -webkit-transform:  scale(.5); }		
	ul.css3demo4 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo4 li:hover {  -webkit-transform:  scale(1.5); }		
	ul.css3demo5 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo5 li:hover { -webkit-transform:  translate3d(10px, 0, 0); }
	ul.css3demo6 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo6 li:hover { -webkit-box-shadow: 3px 3px 3px rgba(0,0,0, 0.5); }		
	ul.css3demo7 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo7 li:hover { background: #0cf; }		
	ul.css3demo8 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo8 li:hover { -webkit-transform: scale3d(.5, 1, 1); }		
	ul.css3demo9 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo9 li:hover {  -webkit-transform: scale3d(1, 0.5, 1); }		
	ul.css3demo10 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo10 li:hover { -webkit-transform: rotate(360deg); }		
	ul.css3demo11 li { -webkit-transition: opacity 0.8s ease-in; opacity: 0.4;  }
	ul.css3demo11 li:hover { opacity: 1; }		
	ul.css3demo12 li { -webkit-transition: opacity 1s ease-in; opacity: 1.0;  }
	ul.css3demo12 li:hover { opacity: 0.4; }		
	ul.css3demo13 li { -webkit-transition: -webkit-transform 1s ease-in-out;   }
	ul.css3demo13 li:hover { -webkit-animation: spin 0.3s infinite linear; }
	@-webkit-keyframes spin {
		0% { -webkit-transform: rotate(0deg); }
		100% { -webkit-transform: rotate(360deg);  }
	}
	ul.css3demo14 li { -webkit-transition: -webkit-transform 5s ease-in-out;   }
	ul.css3demo14 li:hover { -webkit-animation: colorize 3s infinite linear; }
	@-webkit-keyframes colorize {
		0% { background-color: #333; }
		100% { background-color: #ff0;  }
	}
	ul.css3demo15 li { -webkit-transition: all 2s ease-in-out;   }
	ul.css3demo15 li:hover { -webkit-animation: shape 1s infinite linear; }
	@-webkit-keyframes shape {
		100% { -webkit-border-radius: 50px;  }
	}
</style>
<p>Before we start, let&#8217;s add the following CSS to change the look and feel of your &lt;ul&gt; list items. </p>
<pre>ul.css3demo li { -webkit-border-radius: 15px; display: block; float: left; width: 50px; height: 50px; margin: 10px; background: #000; color: #fff; text-indent: -5000em; }</pre>
<p>And now let&#8217;s take a look at 15 different CSS3 animations and their source code.  </p>
<div class="css3demodiv">
<strong>Tilt</strong></p>
<ul class="css3demo css3demo1">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo1 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo1 li:hover {  -webkit-transform:  rotate3d(0, 0, 0, 50deg); -webkit-transform-style: preserve-3d; }
</pre>
</div>
<div class="css3demodiv">
<strong>Pushed Down (by 40px)</strong></p>
<ul class="css3demo css3demo2">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo2 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo2 li:hover { -webkit-transform:  translate3d(0, 40px, 0); }
</pre>
</div>
<div class="css3demodiv">
<strong>Smaller</strong></p>
<ul class="css3demo css3demo3">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo3 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo3 li:hover {  -webkit-transform:  scale(.5); }
</pre>
</div>
<div class="css3demodiv">
<strong>Bigger</strong></p>
<ul class="css3demo css3demo4">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo4 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo4 li:hover {  -webkit-transform:  scale(1.5); }
</pre>
</div>
<div class="css3demodiv">
<strong>Slide Right (by 10px)</strong></p>
<ul class="css3demo css3demo5">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo5 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo5 li:hover { -webkit-transform:  translate3d(10px, 0, 0); }
</pre>
</div>
<div class="css3demodiv">
<strong>Add Shadow</strong></p>
<ul class="css3demo css3demo6">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo6 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo6 li:hover { -webkit-box-shadow: 3px 3px 3px rgba(0,0,0, 0.5); }
</pre>
</div>
<div class="css3demodiv">
<strong>Change Color</strong></p>
<ul class="css3demo css3demo7">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo7 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo7 li:hover { background: #0cf; }
</pre>
</div>
<div class="css3demodiv">
<strong>Shrink horizontally (by 50%)</strong></p>
<ul class="css3demo css3demo8">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo8 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo8 li:hover { -webkit-transform: scale3d(.5, 1, 1); }
</pre>
</div>
<div class="css3demodiv">
<strong>Shrink vertically (by 50%)</strong></p>
<ul class="css3demo css3demo9">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo9 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo9 li:hover {  -webkit-transform: scale3d(1, 0.5, 1); }
</pre>
</div>
<div class="css3demodiv">
<strong>Rotate 360 degree</strong></p>
<ul class="css3demo css3demo10">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo10 li { -webkit-transition: all 0.3s linear; }
	ul.css3demo10 li:hover { -webkit-transform: rotate(360deg); }
</pre>
</div>
<div class="css3demodiv">
<strong>Fade In</strong></p>
<ul class="css3demo css3demo11">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo11 li { -webkit-transition: opacity 0.8s ease-in; opacity: 0.4;  }
	ul.css3demo11 li:hover { opacity: 1; }
</pre>
</div>
<div class="css3demodiv">
<strong>Fade Out</strong></p>
<ul class="css3demo css3demo12">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo12 li { -webkit-transition: opacity 1s ease-in; opacity: 1.0;  }
	ul.css3demo12 li:hover { opacity: 0.4; }
</pre>
</div>
<div class="css3demodiv">
<strong>Spin</strong></p>
<ul class="css3demo css3demo13">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo13 li { -webkit-transition: -webkit-transform 1s ease-in-out;   }
	ul.css3demo13 li:hover { -webkit-animation: spin 0.3s infinite linear; }
	@-webkit-keyframes spin {
		0% { -webkit-transform: rotate(0deg); }
		100% { -webkit-transform: rotate(360deg); background-color: #ff0;  }
	}
</pre>
</div>
<div class="css3demodiv">
<strong>Fade to Color (Colorize)</strong></p>
<ul class="css3demo css3demo14">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo14 li { -webkit-transition: -webkit-transform 5s ease-in-out;   }
	ul.css3demo14 li:hover { -webkit-animation: colorize 3s infinite linear; }
	@-webkit-keyframes colorize {
		0% { background-color: #333; }
		100% { background-color: #ff0;  }
	}
</pre>
</div>
<div class="css3demodiv">
<strong>Change Shape</strong></p>
<ul class="css3demo css3demo15">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<pre>
	ul.css3demo15 li { -webkit-transition: all 2s ease-in-out;   }
	ul.css3demo15 li:hover { -webkit-animation: shape 1s infinite linear; }
	@-webkit-keyframes shape {
		100% { -webkit-border-radius: 50px;  }
	}
</pre>
</div>
<p>Read <a href="http://eisabainyo.net/weblog/2011/06/28/introduction-to-css3-animations-by-examples/">Introduction to CSS3 Animations by Examples</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/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/11/opacity-in-css/" rel="bookmark" title="May 11, 2009">Opacity in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/02/19/web-20-star-burst-in-photoshop/" rel="bookmark" title="February 19, 2007">web 2.0 star burst in Photoshop</a></li>

<li><a href="http://eisabainyo.net/weblog/2008/12/25/removing-background-image-from-fckeditor-in-drupal/" rel="bookmark" title="December 25, 2008">Removing background image from FCKEditor in Drupal</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/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/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/" rel="bookmark" title="January 31, 2011">Top 10 jQuery Mobile Code Snippets that you need to know</a></li>
</ul><!-- Similar Posts took 101.988 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2011/06/28/introduction-to-css3-animations-by-examples/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>10 Useful Javascript Snippets for your mobile websites</title>
		<link>http://eisabainyo.net/weblog/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/</link>
		<comments>http://eisabainyo.net/weblog/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 12:41:39 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1713</guid>
		<description><![CDATA[After developing a few mobile websites in the past few months, I notice that I am reusing certain Javascript code in every project.  Followings are the 10 Useful Javascript Snippets that I use for mobile sites.  Note that some snippets require jQuery mobile framework.
1. Add class name &#8220;iPhone&#8221; or &#8220;Android&#8221; to body element [...]<p>Read <a href="http://eisabainyo.net/weblog/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/">10 Useful Javascript Snippets for your mobile websites</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/05/30/designing-and-optimising-websites-for-ipad/" rel="bookmark" title="May 30, 2010">Designing and Optimising Websites for iPad</a></li>

<li><a href="http://eisabainyo.net/weblog/2012/01/14/display-location-aware-google-map-on-page-load-with-jquery-mobile/" rel="bookmark" title="January 14, 2012">Display a location-aware google map on page load with jQuery mobile</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/" rel="bookmark" title="June 20, 2011">How to use Google Fonts in your WordPress Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/11/opacity-in-css/" rel="bookmark" title="May 11, 2009">Opacity in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/" rel="bookmark" title="January 31, 2011">Top 10 jQuery Mobile Code Snippets that you need to know</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>
</ul><!-- Similar Posts took 254.665 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>After developing a few mobile websites in the past few months, I notice that I am reusing certain Javascript code in every project.  Followings are the 10 Useful Javascript Snippets that I use for mobile sites.  Note that some snippets require jQuery mobile framework.</p>
<p><strong>1. Add class name &#8220;iPhone&#8221; or &#8220;Android&#8221; to body element if the page is viewed on iPhone or Android browser</strong></p>
<pre>if (navigator.userAgent.match(/iPhone/i)) {
	$('body').addClass('iPhone');
} else if (navigator.userAgent.match(/Android/i)) {
         $('body').addClass('Android');
}</pre>
<p><em>Examples of iPhone user agent string: </em><br />
Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A537a Safari/419.3<br />
Mozilla/5.0 (iPhone; U; XXXXX like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A477d Safari/419.3</p>
<p><em>Examples of Android user agent string: </em><br />
Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1<br />
Mozilla/5.0 (Linux; U; Android 1.6; en-gb; Dell Streak Build/Donut AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/ 525.20.1<br />
Mozilla/5.0 (Linux; U; Android 2.1-update1; de-de; HTC Desire 1.19.161.5 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17<br />
Mozilla/5.0 (Linux; U; Android 2.2; en-us; DROID2 GLOBAL Build/S273) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1<br />
Mozilla/5.0 (Linux; U; Android 2.2; en-gb; GT-P1000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1<br />
Mozilla/5.0 (Linux; U; Android 2.1-update1; de-de; E10i Build/2.0.2.A.0.24) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17</p>
<p><strong>2. Remove the browser address bar</strong></p>
<pre>window.scrollTo(0, 1);</pre>
<p><strong>3. Prevent touch scrolling on a page</strong></p>
<pre>
notouchmove = function(event) {
	event.preventDefault();
}</pre>
<pre>
&lt;div data-role=&quot;page&quot; id=&quot;home&quot; ontouchmove=&quot;notouchmove(event);&quot;&gt;
...
&lt;/div&gt;
</pre>
<p>OR</p>
<pre>document.body.addEventListener('touchmove', function(event) {
	event.preventDefault();
}, false);</pre>
<p><strong>4. Display a message when the page is viewed in landscape</strong></p>
<pre>
var updateorientation = function (){
	var classname = '',
	top = 100;
	switch(window.orientation){
		case 0:
		classname += &quot;normal&quot;;
		break;

		case -90:
		classname += &quot;landscape&quot;;
		break;

		case 90:
		classname += &quot;landscape&quot;;
		break;

	}

	if (classname == 'landscape') {
		if ($('#overlay').length === 0) {
			window.scrollTo(0, 1);
			$('body').append('&lt;div id=&quot;overlay&quot; style=&quot;width: 100%; height:' + $(document).height() + 'px&quot;&gt;&lt;span style=&quot;top: ' + top + 'px&quot;&gt;Landscape view is not supported for this page.&lt;/span&gt;&lt;/div&gt;');
		}
	} else {
		$('#overlay').remove();
	}
};
</pre>
<p>Usage:</p>
<pre>
var supportsOrientationChange = &quot;onorientationchange&quot; in window,
orientationEvent = supportsOrientationChange ? &quot;orientationchange&quot; : &quot;resize&quot;;

window.addEventListener(orientationEvent, function() {
	updateorientation();
}, false);
</pre>
<p><strong>5. Truncate a description and show full description when touched</strong></p>
<pre>
var truncatedesc = function(trunc, len) {
	if (trunc) {
	  var org = trunc;

	  if (trunc.length &gt; len) {
		trunc = trunc.substring(0, len);
		trunc = trunc.replace(/w+$/, '');

		trunc = '&lt;span class=&quot;truncated&quot;&gt;' + trunc;
		trunc += '&lt;strong class=&quot;more-description&quot;&gt;...&lt;/strong&gt;&lt;/span&gt;';
		trunc += '&lt;span class=&quot;original&quot; style=&quot;display: none;&quot;&gt;' + org + '&lt;/span&gt;';
	  }

	  $('.truncated').live(&quot;touchstart touchend&quot;, function() {
		$(this).closest('div').find('.original').show();
		$(this).closest('div').find('.truncated').hide();
		return false;
	  });

	  return trunc;
	}
};</pre>
<p>Usage:</p>
<pre>truncatedesc(item.description, 100);</pre>
<p><strong>6. Redirect to another page upon successful ajax request (jQuery mobile)</strong></p>
<p>var ajaxurl = &#8216;http://&#8230;&#8217;;  // Your web service URL</p>
<pre>$.ajax({
	url: ajaxurl,
	type: 'GET',
	processData: false,
	contentType: "application/json",
	dataType: "jsonp",
	success: function(data) {
		$.mobile.changePage("results.html");
	},
	error: function() {
		alert('Error!');
	}
});</pre>
<p><strong>7. Remove active state from links in listview (jQuery mobile)</strong></p>
<pre>
$('div').live('pageshow', function (event, ui) {
	$('[data-role=listview] li').removeClass(&quot;ui-btn-active&quot;);
});</pre>
<p><strong>8. Disable default jQuery mobile style from select dropdown (jQuery mobile)</strong></p>
<pre>
$(document).bind(&quot;mobileinit&quot;, function(){
  	$.mobile.page.prototype.options.keepNative = &quot;select&quot;;
});</pre>
<p><strong>9. Dynamically update listview (jQuery mobile)</strong></p>
<pre>
var output  = '&lt;li&gt;&lt;img src=&quot;' + item.image + '&quot; alt=&quot;' + item.title + '&quot; /&gt;';
output += '&lt;h3&gt;&lt;a href=&quot;' + item.url + '&quot;&gt;' + item.title + '&lt;/a&gt;&lt;/h3&gt;';
output += '&lt;/li&gt;';	

$('#mylistul').append(output).listview('refresh');</pre>
<p><strong>10. Dynamically add form input and apply default style (jQuery mobile)</strong></p>
<pre>
var html = '&lt;input type=&quot;search&quot; name=&quot;suburb&quot; id=&quot;suburb&quot; placeholder=&quot;Enter suburb&quot; /&gt;';
$('#searchform').append(html);
$('#suburb').textinput();</pre>
<h3>Recommended Books</h3>
<p>While no book has already been released at Amazon on <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D0%26ref_%3Dnb_sb_noss%26y%3D0%26field-keywords%3Djquery%2520mobile%26url%3Dsearch-alias%253Dstripbooks%23&#038;tag=eisabainyonet-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=390957">jQuery mobile</a>, the following two books on HTML5  and jQuery will help you understand and work with jQuery mobile framework better as jQuery mobile is based on jQuery and uses HTML5. </p>
<div class="book"><a href="http://www.amazon.com/gp/product/0596806027/ref=as_li_ss_tl?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399369&#038;creativeASIN=0596806027"><img src="http://eisabainyo.net/weblog/wp-content/uploads/2011/06/html5.png" alt="" title="HTML5: Up and Running" width="90"  class="alignnone size-full wp-image-1128" /><span>HTML5: Up and Running</span></a>
</div>
<div class="book"><a href="http://www.amazon.com/gp/product/0980576857/ref=as_li_ss_tl?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399369&#038;creativeASIN=0980576857"><img src="http://eisabainyo.net/weblog/wp-content/uploads/2011/06/jqueryninja.jpg" alt="" title="jQuery: Novice to Ninja" width="90" height="111" class="alignnone size-full wp-image-1127" /><span>jQuery: Novice to Ninja</span></a>
</div>
<p>Read <a href="http://eisabainyo.net/weblog/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/">10 Useful Javascript Snippets for your mobile websites</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/05/30/designing-and-optimising-websites-for-ipad/" rel="bookmark" title="May 30, 2010">Designing and Optimising Websites for iPad</a></li>

<li><a href="http://eisabainyo.net/weblog/2012/01/14/display-location-aware-google-map-on-page-load-with-jquery-mobile/" rel="bookmark" title="January 14, 2012">Display a location-aware google map on page load with jQuery mobile</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/" rel="bookmark" title="June 20, 2011">How to use Google Fonts in your WordPress Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/11/opacity-in-css/" rel="bookmark" title="May 11, 2009">Opacity in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/" rel="bookmark" title="January 31, 2011">Top 10 jQuery Mobile Code Snippets that you need to know</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>
</ul><!-- Similar Posts took 44.630 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use Google Fonts in your WordPress Theme</title>
		<link>http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/</link>
		<comments>http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 10:39:19 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1730</guid>
		<description><![CDATA[Using Google Fonts in your WordPress Theme is very easy and it can be completed in 3 simple steps.  
1. 
Go to Google Web Fonts, browse all the fonts available for use on your website  and pick any font you like.  For this example, I will be using Droid Sans. 
2.
Click on [...]<p>Read <a href="http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/">How to use Google Fonts in your WordPress Theme</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/2008/09/03/google-chrome-browser/" rel="bookmark" title="September 3, 2008">Google Chrome Browser</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/11/04/my-favourite-web-20-fonts/" rel="bookmark" title="November 4, 2007">My favourite web 2.0 fonts</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/30/designing-and-optimising-websites-for-ipad/" rel="bookmark" title="May 30, 2010">Designing and Optimising Websites for iPad</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/11/opacity-in-css/" rel="bookmark" title="May 11, 2009">Opacity in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/26/professional-mobile-themes-for-wordpress/" rel="bookmark" title="June 26, 2011">Professional Mobile Themes for 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/2010/06/06/themeforest-vs-woothemes/" rel="bookmark" title="June 6, 2010">ThemeForest vs WooThemes</a></li>
</ul><!-- Similar Posts took 152.016 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>Using Google Fonts in your WordPress Theme is very easy and it can be completed in 3 simple steps.  </p>
<p><strong>1. </strong><br />
Go to <a href="http://www.google.com/webfonts">Google Web Fonts</a>, browse all the fonts available for use on your website  and pick any font you like.  For this example, I will be using <a href="http://www.google.com/webfonts/family?family=Droid+Sans&#038;subset=latin">Droid Sans</a>. </p>
<p><strong>2.</strong><br />
Click on the font name to go to the font page and then click on <strong>Use This Font</strong> tab and copy and paste the css include into the &lt;head&gt; section in Header (<strong>header.php</strong>) file of your WordPress Theme.</p>
<pre>&lt;link href='http://fonts.googleapis.com/css?family=Droid+Sans&amp;v1' rel='stylesheet' type='text/css'&gt;</pre>
<p><strong>3.</strong><br />
Edit the Stylesheet (<strong>style.css</strong>) file of your current WordPress Theme and add the following line of CSS: </p>
<pre>SELECTOR { font-family: 'Droid Sans', arial, serif; }</pre>
<p>Replace SELECTOR with the correct selector; for example: h1, .title, .post h2, etc.</p>
<p>And that&#8217;s it.  It is very simple and doesn&#8217;t require any <a href="http://eisabainyo.net/weblog/2009/04/27/sifr-vs-flir-font-replacement-techniques/">font replacement techniques</a> that use Flash or Javascript.  </p>
<p><strong>Browser Compatibility of Google Web Fonts API</strong></p>
<p>According to the Official FAQs, the Google Font API is compatible with the following browsers:</p>
<ul>
<li>Google Chrome: version 4.249.4+</li>
<li>Mozilla Firefox: version: 3.5+</li>
<li>Apple Safari: version 3.1+</li>
<li>Opera: version 10.5+</li>
<li>Microsoft Internet Explorer: version 6+</li>
</ul>
<p>It also works reliably on the vast majority of modern mobile operating systems, including Android 2.2+ and iOS 4.2+ (iPhone, iPad, iPod).</p>
<p>Read <a href="http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/">How to use Google Fonts in your WordPress Theme</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/2008/09/03/google-chrome-browser/" rel="bookmark" title="September 3, 2008">Google Chrome Browser</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/11/04/my-favourite-web-20-fonts/" rel="bookmark" title="November 4, 2007">My favourite web 2.0 fonts</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/30/designing-and-optimising-websites-for-ipad/" rel="bookmark" title="May 30, 2010">Designing and Optimising Websites for iPad</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/11/opacity-in-css/" rel="bookmark" title="May 11, 2009">Opacity in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/26/professional-mobile-themes-for-wordpress/" rel="bookmark" title="June 26, 2011">Professional Mobile Themes for 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/2010/06/06/themeforest-vs-woothemes/" rel="bookmark" title="June 6, 2010">ThemeForest vs WooThemes</a></li>
</ul><!-- Similar Posts took 32.406 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use hi-res images in web apps for iPhone4</title>
		<link>http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/</link>
		<comments>http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 11:24:32 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1679</guid>
		<description><![CDATA[If you have been developing websites and web apps for mobile, you may have noticed that the images are not very crisp on iPhone 4.  The Retina display on iPhone 4 is the sharpest, most vibrant, highest-resolution phone screen ever but you need to know how to utilise it.  The images you use [...]<p>Read <a href="http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/">How to use hi-res images in web apps for iPhone4</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/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</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/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/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/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/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 155.002 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>If you have been developing websites and web apps for mobile, you may have noticed that the images are not very crisp on iPhone 4.  The Retina display on iPhone 4 is the sharpest, most vibrant, highest-resolution phone screen ever but you need to know how to utilise it.  The images you use on the websites need to be high resolution (at least 2 times bigger than the normal size) in order for them to look sharp on iPhone 4.  The good news is, it is possible to use hi-res images in web apps / websites for iPhone4 without using any javascript.</p>
<p><strong>For images that are displayed via &lt;img&gt; tags:</strong></p>
<p>Save the image in x2 resolution.  For example, if your logo is 50&#215;50 pixels, make sure it is saved as 100&#215;100 pixels (Resolution: 144 in Photoshop)</p>
<p>And in your HTML source code, make sure to specify height and width attributes for the &lt;img&gt; tag like below:</p>
<p><code>&lt;img src=&quot;images/logo.png&quot; alt=&quot;Web Development Blog&quot; width=&quot;50&quot; height=&quot;50&quot; /&gt;</code></p>
<p><strong>For images that are displayed as background images via CSS:</strong></p>
<p>This is a bit trickier, because you don&#8217;t want to use hi-res images for iPhone 3 or Android or other mobile browsers.  To target just iPhone 4, add the following line of code in the &lt;head&gt; section of your page right after the normal CSS include.</p>
<p><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;css/common.css&quot; /&gt;</code></p>
<p><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;css/hires.css&quot; media=&quot;only screen and (-webkit-min-device-pixel-ratio: 2)&quot;/&gt;</code></p>
<p>And for every image, you need to save 2 versions &#8211; one for the regular view and the other one for the hi-res view.  For example, button-signup.jpg and button-signup2x.jpg.  The button-signup.jpg will be 50&#215;20 pixels whereas the button-signup2x.jpg will be 100&#215;40 pixels.  </p>
<p>In your hires.css file, you will have something like the following:</p>
<p><code>#signup { background: transparent url(../images/button-signup2x.jpg) 0 0 no-repeat;  background-size: 50px 20px; }</code></p>
<p>Note that the background-size is the size of the image in regular view.  This will allow the background image to be shrunk so it fits within the specified element. The background-size property is a CSS3 property and it lets you specify the size of background images. </p>
<p>And in your style.css, you will have:</p>
<p><code>#signup { background: transparent url(../images/button-signup.jpg) 0 0 no-repeat; }</code></p>
<p>And that&#8217;s all! </p>
<p>Read <a href="http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/">How to use hi-res images in web apps for iPhone4</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/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</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/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/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/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/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 49.159 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 10 jQuery Mobile Code Snippets that you need to know</title>
		<link>http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/</link>
		<comments>http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 03:48:57 +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=1669</guid>
		<description><![CDATA[jQuery Mobile is a framework for mobile web apps and mobile websites with an aim to provide a unified user interface system across many mobile device platforms such iPhone, BlackBerry, Android and Windows Mobile.  The framework is built on top of one of the most popular Javascript frameworks, jQuery.  
Followings are some of [...]<p>Read <a href="http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/">Top 10 jQuery Mobile Code Snippets that you need to know</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/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</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/2012/01/14/display-location-aware-google-map-on-page-load-with-jquery-mobile/" rel="bookmark" title="January 14, 2012">Display a location-aware google map on page load with jQuery mobile</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/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/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/" rel="bookmark" title="June 23, 2011">10 Useful Javascript Snippets for your mobile websites</a></li>
</ul><!-- Similar Posts took 60.250 ms --></div>]]></description>
			<content:encoded><![CDATA[<p><a href="http://jquerymobile.com/">jQuery Mobile</a> is a framework for mobile web apps and mobile websites with an aim to provide a unified user interface system across many mobile device platforms such iPhone, BlackBerry, Android and Windows Mobile.  The framework is built on top of one of the most popular Javascript frameworks, <a href="http://jquery.com">jQuery</a>.  </p>
<p>Followings are some of the most useful code snippets that I&#8217;ve used in my recent web app developed using jQuery Mobile framework.  </p>
<p><strong>1. Disable truncation for list items and buttons</strong></p>
<p>If your list item or button has a long text, it will be truncated automatically by jQuery Mobile.  To disable this truncation, add &#8220;<code>white-space: normal;</code>&#8221; to the CSS selector in question.  </p>
<p>For example, to disable truncation for buttons:</p>
<pre>.ui-btn-text {
white-space: normal;
}</pre>
<p>To disable truncation for list descriptions:</p>
<pre>.ui-li-desc {
white-space: normal;
}</pre>
<p>To enable truncation, set it to &#8220;<code>white-space: nowrap;</code>&#8220;.  </p>
<p><strong>2. Display a random background image on page load</strong></p>
<p>jQuery Mobile has a number of page initialization events that you can use to trigger certain methods on page load.  The following CSS + Javascript can be used to display a random background image every time a page is loaded.  </p>
<p><strong>CSS</strong></p>
<pre>
.my-page  { background: transparent url(../images/bg.jpg) 0 0 no-repeat; }

.my-page.bg1 { background: transparent url(../images/bg-1.jpg) 0 0 no-repeat; }

.my-page.bg2 { background: transparent url(../images/bg-2.jpg) 0 0 no-repeat; }

.my-page.bg3 { background: transparent url(../images/bg-3.jpg) 0 0 no-repeat; }
</pre>
<p><strong>Javascript</strong></p>
<pre>
$('.my-page').live(&quot;pagecreate&quot;, function() {
	var randombg = Math.floor(Math.random()*4); // 0 to 3
	$('.my-page').removeClass().addClass('bg' + randombg);
});</pre>
<p><strong>3. Disable a button action</strong></p>
<p>To disable a button action (for eg: from opening a page), add the following Javascript.</p>
<pre>$('#home-button').button("disable");</pre>
<p>And to re-enable it:</p>
<pre>$('#home-button').button("enable");</pre>
<p><strong>4. Disable loading pop-up message </strong></p>
<p>I find the loading pop-up message a bit annoying because it gets triggered everytime you load a different page.  To disable this: add the following line of code into your JS file.</p>
<pre>$.mobile.pageLoading(true);</pre>
<p>By default, it is enabled like so:</p>
<pre>$.mobile.pageLoading();</pre>
<p><strong>5. Create a custom theme </strong></p>
<p>jQuery Mobile framework comes with <a href="http://jquerymobile.com/test/docs/#buttons/buttons-themes.html">5 themes</a> &#8211; Theme A, Theme B, Theme C, Theme D and Theme E.   But you can easily create  a new theme for your web app.  </p>
<p>The steps to create a new theme:<br />
1. Copy CSS for any theme from jQuery Mobile CSS file and paste it into your own CSS file.<br />
2. Give your theme a name and rename the CSS selectors appropriately.  Your theme name can be any alphabet character (a to z).  So for example, if you copied Theme C, and you want to call your theme Theme Z, rename <code>.ui-btn-up-c</code> to <code>.ui-btn-up-z</code>, <code>.ui-body-c</code> to <code>.ui-body-z</code> and so on.<br />
3. Change colors and styles of your custom theme<br />
4. To apply your custom theme z to any element, just set the data-theme attribute to z.  For example:
<pre>&lt;div data-role=&quot;page&quot; data-theme=&quot;z&quot;&gt;</pre>
<p><strong>6.  Use a custom font</strong></p>
<p>There are a few font-replacement methods available such as cufon, sIFR, FLIR, @font-face and Google Fonts API.  When building a web app using jQuery Mobile, I found that @font-face method is the easiest method to work with and the performance is quite satisfactory.  If you are interested in @font-face, here is a <a href="http://net.tutsplus.com/tutorials/design-tutorials/quick-tip-how-to-work-with-font-face/">helpful tutorial with a demo</a> on how to work with @font-face method. </p>
<p><strong>7. Create an image-only button with no text</strong></p>
<p>Sometimes, you may not want to have any text for your button but still use the rest of the features that comes with a button element.  This is usually the case with a home button or an info button.  To hide any text associated with the button, set data-iconpos attribute to &#8220;notext&#8221;.  For example:</p>
<pre>&lt;a href=&quot;../index.html&quot; data-icon=&quot;grid&quot;
class=&quot;ui-btn-right&quot; data-iconpos=&quot;notext&quot;&gt;Home&lt;/a&gt;</pre>
<p><strong>8. Open a link without using AJAX with page transitions</strong></p>
<p>To open a link without using AJAX with page transitions (ie: reloading the full page the old-school way), set rel attribute to &#8220;external&#8221;.  </p>
<pre>&lt;a href=&quot;../index.html&quot; data-icon=&quot;grid&quot;
class=&quot;ui-btn-right&quot; rel=&quot;external&quot;&gt;Home&lt;/a&gt;</pre>
<p><strong>9. Remove an arrow from a list item</strong></p>
<p>By default, jQuery Mobile framework adds an arrow next to every list item.  To disable this, set data-icon attribute to &#8220;false&#8221; on the list item that you&#8217;d like the arrow to be removed.</p>
<pre>&lt;li data-icon=&quot;false&quot;&gt;&lt;a href=&quot;contact.html&quot;&gt;Contact Us&lt;/a&gt;&lt;/li&gt;</pre>
<p><strong>10. Set background color of a page</strong></p>
<p>This may sound simple but it took me a few minutes to figure out how to apply a background color to a page without having it overwritten by jQuery Mobile CSS.   Normally, you&#8217;d set a background color to body element but if you are using jQuery Mobile framework, you need to set it to ui-page class.  </p>
<pre>.ui-page {
background: #eee;
}</pre>
<h3>Recommended Books</h3>
<p><a href="http://www.amazon.com/gp/product/1449306683/ref=as_li_ss_tl?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399373&#038;creativeASIN=1449306683">jQuery Mobile</a><img src="http://www.assoc-amazon.com/e/ir?t=&#038;l=as2&#038;o=1&#038;a=1449306683&#038;camp=217145&#038;creative=399373" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p><a href="http://www.amazon.com/gp/product/1849515905/ref=as_li_ss_tl?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399373&#038;creativeASIN=1849515905">jQuery Mobile First Look</a><img src="http://www.assoc-amazon.com/e/ir?t=&#038;l=as2&#038;o=1&#038;a=1849515905&#038;camp=217145&#038;creative=399373" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p>The following two books on HTML5  and jQuery will also help you understand and work with jQuery mobile framework better as jQuery mobile is based on jQuery and uses HTML5. </p>
<div class="book"><a href="http://www.amazon.com/gp/product/0596806027/ref=as_li_ss_tl?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399369&#038;creativeASIN=0596806027"><img src="http://eisabainyo.net/weblog/wp-content/uploads/2011/06/html5.png" alt="" title="HTML5: Up and Running" width="90"  class="alignnone size-full wp-image-1128" /><span>HTML5: Up and Running</span></a>
</div>
<div class="book"><a href="http://www.amazon.com/gp/product/0980576857/ref=as_li_ss_tl?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399369&#038;creativeASIN=0980576857"><img src="http://eisabainyo.net/weblog/wp-content/uploads/2011/06/jqueryninja.jpg" alt="" title="jQuery: Novice to Ninja" width="90" height="111" class="alignnone size-full wp-image-1127" /><span>jQuery: Novice to Ninja</span></a>
</div>
<p>Read <a href="http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/">Top 10 jQuery Mobile Code Snippets that you need to know</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/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</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/2012/01/14/display-location-aware-google-map-on-page-load-with-jquery-mobile/" rel="bookmark" title="January 14, 2012">Display a location-aware google map on page load with jQuery mobile</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/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/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/" rel="bookmark" title="June 23, 2011">10 Useful Javascript Snippets for your mobile websites</a></li>
</ul><!-- Similar Posts took 51.878 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to code an HTML Email Newsletter</title>
		<link>http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/</link>
		<comments>http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/#comments</comments>
		<pubDate>Mon, 31 May 2010 06:19:58 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[xHTML]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1490</guid>
		<description><![CDATA[In this step-by-step tutorial, I&#8217;m going to show you exactly how to code an HTML email; be it an HTML Email Signature or HTML Email Newsletter.  

1.  Changing the background color

&#60;table width=&#34;100%&#34; border=&#34;0&#34; cellspacing=&#34;0&#34; cellpadding=&#34;0&#34; bgcolor=&#34;#333333&#34;&#62;
  &#60;tr&#62;
    &#60;td&#62;

	&#60;/td&#62;
   &#60;/tr&#62;
&#60;/table&#62;

2. Setting a fixed width and background color for [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/">How to code an HTML Email Newsletter</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/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/" rel="bookmark" title="June 20, 2011">How to use Google Fonts in your WordPress Theme</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/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/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/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/2007/02/14/web-20-reflection-effect-in-photoshop/" rel="bookmark" title="February 14, 2007">web 2.0 reflection effect in Photoshop</a></li>
</ul><!-- Similar Posts took 127.170 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>In this step-by-step tutorial, I&#8217;m going to show you exactly how to code an HTML email; be it an HTML Email Signature or HTML Email Newsletter.  </p>
<p><a href="http://eisabainyo.net/view/streamsend" target="_blank"><img src="http://www.awltovhc.com/image-3838536-10786843" width="300" height="100" alt="StreamSend.com" border="0"/></a></p>
<p><strong>1.  Changing the background color</strong></p>
<pre>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#333333&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;

	&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p><strong>2. Setting a fixed width and background color for the content area</strong></p>
<pre>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#333333&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;
		&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td&gt;

			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;/table&gt;
	&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p><strong>3.  Changing the font size, style and color of the content area</strong></p>
<pre>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#333333&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;
		&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td&gt;

			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;/table&gt;
	&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p><strong>4. Setting a different font, color and style for headings</strong></p>
<pre>&lt;span style=&quot;font-size: 14px; font-weight: bold; color: #ed0000;
font-family:Arial, Helvetica, sans-serif;&quot;&gt;Latest News from the Web Development Blog&lt;/span&gt;</pre>
<p><strong>5. Inserting a line between two blocks of text</strong></p>
<pre>
	&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td&gt;
				First block of text.
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border-top: 1px solid #66666;&quot;&gt;
				Second block of text.
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;
</pre>
<p><strong>6. Inserting and floating an image to the left</strong></p>
<pre>
	&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td width=&quot;150&quot; align=&quot;left&quot; valign=&quot;top&quot;&gt;
				&lt;img src=&quot;http://full.path.to.the.image/image.jpg&quot; width=&quot;120&quot; height=&quot;100&quot; alt=&quot;My image&quot; /&gt;
			&lt;/td&gt;
			&lt;td width=&quot;450&quot; align=&quot;left&quot; valign=&quot;top&quot;&gt;
				Text next to the image
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td colspan=&quot;2&quot;&gt;
				Copyright text
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;
</pre>
<p><strong>7. Aligning text to right (or left or center)</strong></p>
<pre>
	&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;div&gt;Some text goes here&lt;/div&gt;
				&lt;div align=&quot;right&quot;&gt;&lt;a href=&quot;#&quot;&gt;Read more&lt;/a&gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;
</pre>
<p><strong>8. Changing a link color </strong></p>
<pre>&lt;a href=&quot;#&quot; style=&quot;color: #00ccff;
text-decoration: none;&quot;&gt;Read more&lt;/a&gt;</pre>
<p><strong>9. Adding a border around the content area</strong></p>
<pre>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#333333&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;
		&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px; border: 1px solid #00ccff; border-collapse: collapse;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td&gt;

			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;/table&gt;
	&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p><strong>10. Opening a link in a new window</strong></p>
<pre>&lt;a href=&quot;http://www.google.com&quot; target=&quot;_blank&quot;
style=&quot;color: #00ccff; text-decoration: none;&quot;&gt;Go to Google&lt;/a&gt;</pre>
<p><strong>Putting it altogether</strong></p>
<p><img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/05/sample-newsletter-300x280.gif" alt="" title="Sample Email Newsletter" width="300" height="280" class="alignnone size-medium wp-image-1496" /></p>
<pre>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;10&quot; bgcolor=&quot;#cccccc&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;
		&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;10&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px; border: 1px solid #999999; border-collapse: collapse;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td colspan=&quot;2&quot; height=&quot;70&quot; bgcolor=&quot;#000033&quot;&gt;
				&lt;span style=&quot;font-size: 14px; font-weight: bold; color: #ff6600; font-family:Arial, Helvetica, sans-serif;&quot;&gt;Latest News from the Web Development Blog&lt;/span&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td colspan=&quot;2&quot; height=&quot;10&quot; bgcolor=&quot;#ff6600&quot;&gt;&lt;/td&gt;
		&lt;tr&gt;
		&lt;tr&gt;
			&lt;td width=&quot;150&quot; align=&quot;left&quot; valign=&quot;top&quot;&gt;
				&lt;img src=&quot;http://eisabainyo.net/weblog/wp-content/uploads/2010/05/sexy-web-design.jpg&quot; width=&quot;250&quot; height=&quot;326&quot; alt=&quot;Sexy Web Design Book Cover&quot; /&gt;
			&lt;/td&gt;
			&lt;td width=&quot;450&quot; align=&quot;left&quot; valign=&quot;top&quot;&gt;
				&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tincidunt nisl et felis sodales faucibus. In hac habitasse platea dictumst. Sed tincidunt egestas velit mollis faucibus. Aliquam feugiat, neque nec porta accumsan, odio nulla laoreet risus, ut vestibulum lacus velit eget mi. Aliquam vehicula magna sed leo lobortis et luctus magna venenatis. Nunc et massa ipsum. In tristique, elit hendrerit tincidunt consectetur, diam purus tempor ante, eget scelerisque velit est vitae lorem. Nullam vulputate blandit dui et tempor. Curabitur quam lectus, suscipit non placerat a, consectetur vel velit. &lt;/p&gt;
				&lt;p&gt;Vestibulum egestas ipsum quis elit pulvinar ullamcorper. Vestibulum ac neque sed neque consequat ornare eu et justo. Phasellus pulvinar vestibulum nisl, ut tempus dolor commodo at. Morbi ultricies nisl vel massa accumsan tempor. Donec quam nibh, euismod vitae vestibulum ac, ullamcorper non eros. Integer quis sapien ac enim rhoncus auctor. Nulla facilisi. Vivamus et varius massa. Integer aliquam ultricies risus nec vulputate. Donec porta viverra magna, a suscipit arcu porta non. &lt;/p&gt;
				&lt;div align=&quot;right&quot;&gt;&lt;a href=&quot;#&quot; style=&quot;color: #ff6600; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Read more&lt;/a&gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td colspan=&quot;2&quot;&gt;
				&lt;p&gt;Praesent ut purus sit amet elit tincidunt laoreet a sed mauris. Integer a lacinia augue. Donec hendrerit sapien et lorem tincidunt a luctus purus vehicula. Cras magna diam, auctor sit amet pretium in, pretium a odio. Proin sed laoreet lorem. Mauris tortor diam, tempus sit amet lacinia in, egestas eu lectus. Vivamus aliquet hendrerit tellus sit amet pretium. Praesent dictum libero pretium magna pretium congue. Pellentesque consequat est a tortor tincidunt placerat in a ante. Sed non elit enim, vitae scelerisque ipsum. Integer fringilla, massa in ultrices bibendum, orci neque luctus arcu, in pulvinar elit risus eu nunc. Etiam dignissim malesuada consequat. Donec eget magna risus, eu vehicula ante. Quisque adipiscing placerat tincidunt. Aliquam ultrices vehicula velit, vel dignissim sem feugiat malesuada. Donec magna nisi, pretium at ullamcorper ultrices, sodales eu odio. Nulla facilisi. Curabitur hendrerit dictum rhoncus. Praesent bibendum dapibus ligula, ut placerat dolor vulputate vel. &lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td colspan=&quot;2&quot; bgcolor=&quot;#cccccc&quot;&gt;
				&lt;span style=&quot;font-size: 10px; font-weight: bold; color: #666666; font-family:Arial, Helvetica, sans-serif;&quot;&gt;Copyright 2010 All Rights Reserved.&lt;/span&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;
	&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p><strong>Email Newsletter Templates</strong></p>
<p>If you are looking for professional email newsletter designs, <a href="http://themeforest.net/?ref=eisabai">ThemeForest</a> is the best place to buy email newsletter templates because each template package comes with a complete HTML code and layered PSD file (and sometimes multiple color variations).  Our favourites are:</p>
<p><a href="http://themeforest.net/item/inewsletter/82750?ref=eisabai">iNewsletter<br />
<img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/05/inewsletter.jpg" alt="" title="iNewsletter" width="450" class="alignnone size-full wp-image-1498" /></a></p>
<p><a href="http://themeforest.net/item/platnum-email-template-6-layouts-8-colors/92281?ref=eisabai">Platnum<br />
<img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/05/platnum.jpg" alt="" title="Platnum" width="450" class="alignnone size-full wp-image-1499" /><br />
</a></p>
<p>Read <a href="http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/">How to code an HTML Email Newsletter</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/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/" rel="bookmark" title="June 20, 2011">How to use Google Fonts in your WordPress Theme</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/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/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/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/2007/02/14/web-20-reflection-effect-in-photoshop/" rel="bookmark" title="February 14, 2007">web 2.0 reflection effect in Photoshop</a></li>
</ul><!-- Similar Posts took 62.981 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/feed/</wfw:commentRss>
		<slash:comments>7</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/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</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/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/" rel="bookmark" title="January 31, 2011">Top 10 jQuery Mobile Code Snippets that you need to know</a></li>
</ul><!-- Similar Posts took 155.657 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/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</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/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/" rel="bookmark" title="January 31, 2011">Top 10 jQuery Mobile Code Snippets that you need to know</a></li>
</ul><!-- Similar Posts took 191.337 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>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/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</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/2011/06/28/introduction-to-css3-animations-by-examples/" rel="bookmark" title="June 28, 2011">Introduction to CSS3 Animations by Examples</a></li>
</ul><!-- Similar Posts took 232.089 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/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</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/2011/06/28/introduction-to-css3-animations-by-examples/" rel="bookmark" title="June 28, 2011">Introduction to CSS3 Animations by Examples</a></li>
</ul><!-- Similar Posts took 79.399 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>Tips for iPhone Web App Development</title>
		<link>http://eisabainyo.net/weblog/2009/10/27/tips-for-iphone-web-app-development/</link>
		<comments>http://eisabainyo.net/weblog/2009/10/27/tips-for-iphone-web-app-development/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 05:31:32 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development Blog]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=762</guid>
		<description><![CDATA[SEO site checker is the iPhone webapp we launched a few days ago. This is the fourth iPhone web application we&#8217;ve developed and we thought it&#8217;d be useful to share some tips we learnt along the way.  
1.  Get inspiration
Before building anything, we like to browse through existing iPhone web apps that are [...]<p>Read <a href="http://eisabainyo.net/weblog/2009/10/27/tips-for-iphone-web-app-development/">Tips for iPhone Web App Development</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/11/08/five-important-steps-into-iphone-app-development-for-beginners/" rel="bookmark" title="November 8, 2010">Five Important Steps into iPhone App Development for Beginners</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/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>

<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/2011/09/03/book-review-master-mobile-web-apps-with-jquery-mobile/" rel="bookmark" title="September 3, 2011">Book Review: Master Mobile Web Apps with jQuery Mobile</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/08/12/when-an-iphone-web-app-is-better-than-a-native-web-app/" rel="bookmark" title="August 12, 2010">When an iPhone web app is better than a native app</a></li>

<li><a href="http://eisabainyo.net/weblog/2008/01/13/apps-on-friendster/" rel="bookmark" title="January 13, 2008">Apps on Friendster</a></li>
</ul><!-- Similar Posts took 419.162 ms --></div>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.anansi.com.au/apps/seo/">SEO site checker</a> is the iPhone webapp we launched a few days ago. This is the fourth iPhone web application we&#8217;ve developed and we thought it&#8217;d be useful to share some tips we learnt along the way.  </p>
<p><strong>1.  Get inspiration</strong><br />
Before building anything, we like to browse through existing iPhone web apps that are available. There are quite a few iPhone Apps Galleries, but the ones that we often go to are <a href="http://www.apple.com/webapps/">Apple &#8211; Web apps</a>, <a href="http://www.appsafari.com/">appSafari</a> and <a href="http://iphoneapplicationlist.com/">iPhone Application List</a>.</p>
<p><strong>2.  Gather ideas and information</strong><br />
Now you&#8217;ve been inspired by so many good iPhone apps, it&#8217;s time to brainstorm ideas for an application that you would like to build. An original idea will always do better than a second-hand idea.  </p>
<p><strong>3.  Plan</strong><br />
Planning is the most important part of creating a useful and reliable application.  We like to write down our thoughts and implementation ideas in a notepad before jumping into development.  Have a look at one of our <a href="http://twitpic.com/m8hf5">handwritten notes</a> for SEO site checker.  Apart from planning the implementation details, also think about a URL and name for the application.  When deciding a URL, keep it short because iPhone&#8217;s keyboard is not the easiest to type on.   For example, for our SEO site checker app, the URL is http://www.anansi.com.au/apps/seo/ rather than http://www.anansi.com.au/apps/seo-site-checker/</p>
<p><strong>4.  Develop </strong><br />
One of the advantages that comes with building iPhone web apps as opposed to native apps is that you can use any web programming language.  You don&#8217;t need to learn Cocoa or get yourself familiarised with Mac OS.  Essentially, you are just building another web application, but for a small screen. You can use Javascript, AJAX, CSS, HTML for the client side and any server-side language of your choice; be it PHP, Ruby, Perl, Java, .NET, ColdFusion, or ASP.  Download <a href="http://developer.apple.com/safari/library/navigation/index.html#section=Resource%20Types&#038;topic=Sample%20Code">sample code</a> from Safari Reference Library and explore how things are done.</p>
<p>Our tools of the trade:</p>
<p>1) <a href="http://code.google.com/p/iui/">iUI: iPhone User Interface Framework</a> (consists of a JavaScript library, CSS, and images that make your web app looks and feels like an iPhone Native Apps)</p>
<p>2) <a href="http://www.php.net">PHP</a> with a framework (Zend, CakePHP, CodeIgniter or own)</p>
<p>3) <a href="http://www.jquery.com">jQuery</a> if required (We try to do without unless really necessary because bandwidth is quite precious on mobiles)</p>
<p>4) <a href="http://www.apple.com/safari/">Safari</a> is the best browser to test your iPhone web app on especially if you are using iUI framework.  </p>
<p>5) <a href="https://www.google.com/analytics/">Google Analytics</a> to track the statistics</p>
<p><strong>5. Test</strong><br />
During development, you may be able to get away with using Safari on your computer to test the iPhone web application, but when it comes to actual testing stage, you have to use an iPhone.  There are some errors or bugs that you may only discover when you are using an actual iPhone.  For example, when we were developing SEO site checker, we didn&#8217;t see the need to put &#8220;Please wait&#8230; Calculating your website&#8217;s score&#8221; overlay pop up until we realise how long it could take to load up the result page on an actual iPhone.  </p>
<p><strong>6. Release</strong><br />
Once you are happy to release your iPhone web app, it&#8217;s time to create a nice little icon and a screenshot of the app to submit to <a href="http://www.apple.com/webapps/">Apple &#8211; Web apps</a> directory.  Remember to read submission information for <a href="https://adcweb.apple.com/iphone/icons.php">the icon</a> and <a href="https://adcweb.apple.com/iphone/screenshot.php">the screenshot</a>.  It takes about 2 days to be approved and listed in the directory.  In addition to submitting it to the Apple directory, social networking websites are the best marketing channel to promote just about anything these days.   Tweet about your app on Twitter, share the app link on facebook, blog about it, bookmark the app on delicious; the options are endless.  Once it is released, watch the statistics, obtain feedback from people, continually improve the app and follow the &#8220;Release Early, Release Often&#8221; principle to ensure the success of your iPhone web app.  </p>
<p><strong>7. Read, learn and improve</strong><br />
There is always room for improvement.   Read tutorials and books on iPhone Web App Development.  Learn new tips and tricks.  Improve your web apps.   Some of our recommended books on iPhone web development are:</p>
<ul>
<li><a href="http://www.amazon.com/gp/product/0596805780?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0596805780">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;" /><br />
&#8220;The future of mobile development is clearly web technologies like CSS, HTML and JavaScript. Jonathan Stark shows you how to leverage your existing web development skills to build native iPhone applications using these technologies.&#8221;<br />
– John Allsopp, author and founder of Web Directions
</li>
<li><a href="http://www.amazon.com/gp/product/143022620X?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=143022620X">Beginning Smartphone Web Development</a><img src="http://www.assoc-amazon.com/e/ir?t=eisabainyonet-20&#038;l=as2&#038;o=1&#038;a=143022620X" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
Mobile application developers and their managers need to learn mobile web technologies because it’s in their economic interest. Time-to-market and opportunity costs are significantly lower for web-based mobile applications than for native ones.  In this book, Gail teaches the web standards and fundamentals specific to smartphones and other feature-driven mobile phones and devices.
</li>
<li><a href="http://www.amazon.com/gp/product/0321604164?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0321604164">Developing Hybrid Applications for the iPhone</a><img src="http://www.assoc-amazon.com/e/ir?t=eisabainyonet-20&#038;l=as2&#038;o=1&#038;a=0321604164" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
&#8220;For those not ready to tackle the complexities of Objective-C, this is a great way to get started building iPhone apps. If you know the basics of HTML, JavaScript, and CSS, you’ll be building apps in no time.&#8221;<br />
– August Trometer, Owner of FoggyNoggin Software, www.foggynoggin.com
</li>
<li><a href="http://www.amazon.com/gp/product/0470251557?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0470251557">Professional iPhone and iPod touch Programming</a><img src="http://www.assoc-amazon.com/e/ir?t=eisabainyonet-20&#038;l=as2&#038;o=1&#038;a=0470251557" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
 This book is for web developers who want to build new applications for iPhone and iPod touch. A working knowledge of HTML/XHTML, CSS, JavaScript, and AJAX is necessary.
</li>
</ul>
<p>Like we said earlier, one thing we like about iPhone web apps is that you don&#8217;t have to learn a new programming language like Objective C or buy a Mac computer in order to develop an app.  However, when it comes to making a profit from your apps, or ultilising iPhone App Store&#8217;s features, native apps have more advantages.  If you are wanting to get into iPhone native app development without doing the programming yourself, check out <a href="http://bit.ly/d2kMBg" target="_blank">How To Create iPhone Apps With No Programming Experience</a> ebook that teaches you step-by-step how to outsource and market native iPhone app development.  The company behind the ebook has launched 22 iPhone Apps so far using this method and made $56,366.69 in just ad revenue.  So if you have got a good idea for an iPhone app, then it&#8217;s worth giving a shot.  </p>
<div class="contact-us">Interested in getting an <a href="http://www.anansi.com.au/work.php">iPhone web application</a> for your company or organisation?  <a href="http://www.anansi.com.au/contact.php">Contact us</a> at <a href="http://www.anansi.com.au/">Anansi Web Development</a> to find out how we may be able to help you.</div>
<p>Read <a href="http://eisabainyo.net/weblog/2009/10/27/tips-for-iphone-web-app-development/">Tips for iPhone Web App Development</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/11/08/five-important-steps-into-iphone-app-development-for-beginners/" rel="bookmark" title="November 8, 2010">Five Important Steps into iPhone App Development for Beginners</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/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>

<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/2011/09/03/book-review-master-mobile-web-apps-with-jquery-mobile/" rel="bookmark" title="September 3, 2011">Book Review: Master Mobile Web Apps with jQuery Mobile</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/08/12/when-an-iphone-web-app-is-better-than-a-native-web-app/" rel="bookmark" title="August 12, 2010">When an iPhone web app is better than a native app</a></li>

<li><a href="http://eisabainyo.net/weblog/2008/01/13/apps-on-friendster/" rel="bookmark" title="January 13, 2008">Apps on Friendster</a></li>
</ul><!-- Similar Posts took 127.432 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2009/10/27/tips-for-iphone-web-app-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Read more using jQuery live event</title>
		<link>http://eisabainyo.net/weblog/2009/09/14/read-more-using-jquery-live-event/</link>
		<comments>http://eisabainyo.net/weblog/2009/09/14/read-more-using-jquery-live-event/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 01:53:31 +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=740</guid>
		<description><![CDATA[The main purpose of this code is to have &#8220;Read more&#8221; for a long block of text (eg: comments) without having to separate the text into two div blocks and then use toggle to show/hide the 2nd block.  This code simply uses CSS overflow:hidden property to hide long block of text.  jQuery live [...]<p>Read <a href="http://eisabainyo.net/weblog/2009/09/14/read-more-using-jquery-live-event/">Read more using jQuery live event</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/2006/01/26/dummy-text/" rel="bookmark" title="January 26, 2006">Dummy Text</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/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/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/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/04/07/back-to-top-link-with-jquery/" rel="bookmark" title="April 7, 2009">Back to top link with jQuery</a></li>
</ul><!-- Similar Posts took 523.544 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>The main purpose of this code is to have &#8220;Read more&#8221; for a long block of text (eg: comments) without having to separate the text into two div blocks and then use toggle to show/hide the 2nd block.  This code simply uses CSS <code>overflow:hidden</code> property to hide long block of text.  jQuery live event is used to ensure it works for content loaded using AJAX.  </p>
<p><strong>CSS</strong></p>
<pre>
#comments .expandable .comment-body {
	height: 50px;
        overflow: hidden;
}</pre>
<p><strong>Javascript</strong></p>
<pre>
$(&quot;#comments .comment-more a&quot;).live(&quot;click&quot;, function(){
	if ($(this).text() == 'more') {
		$(this).parent().parent().removeClass(&quot;expandable&quot;);
		$(this).text(&quot;less&quot;);
	} else {
		$(this).parent().parent().addClass(&quot;expandable&quot;);
		$(this).text(&quot;more&quot;);
	}
	return false;
});</pre>
<p><strong>HTML</strong></p>
<pre>&lt;div id=&quot;comments&quot;&gt;
	&lt;div class=&quot;comment-content expandable&quot;&gt;
		&lt;div class=&quot;comment-body&quot;&gt;
		&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mattis cursus adipiscing. Donec risus leo, venenatis adipiscing euismod eget, ultricies vitae nunc. Curabitur fermentum tortor vitae nisl fermentum non scelerisque erat posuere. Sed auctor tempor venenatis. Morbi vel urna turpis, adipiscing molestie nisl. Curabitur ut lorem id neque mollis fringilla. Phasellus varius viverra suscipit. Proin eleifend quam in diam dictum suscipit. Praesent eleifend fringilla turpis sit amet commodo. In ullamcorper ligula non augue bibendum ultricies scelerisque tortor congue. Aenean nulla lectus, tincidunt egestas cursus sit amet, tristique non libero. Duis facilisis blandit nisi, eget cursus turpis tristique non. Fusce sodales dolor vel ligula rutrum venenatis. Cras molestie vulputate urna at iaculis. Mauris consequat accumsan mi, non facilisis enim porttitor gravida.&lt;/p&gt;
		&lt;p&gt;Suspendisse et purus a tortor aliquet vestibulum. Sed ullamcorper euismod interdum. Aenean gravida, metus ac imperdiet venenatis, neque ligula viverra urna, a pellentesque elit mi id ligula. In suscipit nunc eget magna bibendum tempor. Nunc ac mauris ut risus posuere accumsan. Nulla dictum semper justo, quis adipiscing sem consectetur quis. Donec felis arcu, convallis pretium consectetur at, semper ullamcorper urna. Proin elit nisi, vehicula eget pretium ac, faucibus vitae justo. Praesent quis arcu eget massa interdum ullamcorper in nec mauris. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent orci nisl, mollis et egestas ut, suscipit et orci. Morbi in justo sit amet ligula facilisis interdum ac id ante. Nam sit amet metus eget augue tristique interdum vitae in metus. Vestibulum tristique vestibulum lorem, eget pharetra ante aliquet eget. Donec fermentum adipiscing sagittis. Quisque interdum, augue non vulputate rutrum, sem tortor facilisis diam, in tincidunt nisi tellus ut eros. &lt;/p&gt;
		&lt;/div&gt;
		&lt;span class=&quot;comment-more&quot;&gt;&lt;a href=&quot;#&quot;&gt;more&lt;/a&gt;&lt;/span&gt;
	&lt;/div&gt;

	&lt;div class=&quot;comment-content expandable&quot;&gt;
		&lt;div class=&quot;comment-body&quot;&gt;
		&lt;p&gt;Vivamus viverra arcu non nibh sollicitudin consectetur. Vivamus sodales erat a tellus semper in feugiat eros pharetra. Aenean vel magna magna, scelerisque molestie risus. Fusce lobortis euismod justo, sed gravida neque porta nec. Aenean risus metus, accumsan et mattis et, semper non erat. Fusce velit enim, viverra a pulvinar nec, viverra vel erat. Praesent sed mi quam, vel dignissim nunc. Nullam accumsan quam ut eros congue eget accumsan arcu bibendum. Nam congue egestas fringilla. Aliquam felis mi, volutpat nec tempor eu, hendrerit quis lorem. Pellentesque pretium metus quis sapien luctus venenatis vitae pretium dolor. Fusce ac tellus a tellus posuere suscipit a quis ante. Quisque ut sem eget risus consequat ornare.&lt;/p&gt;
		&lt;p&gt;Nunc id risus risus, sed pellentesque nisi. Donec pulvinar nisl sit amet eros venenatis ut dictum odio pretium. Nulla hendrerit ligula a metus rutrum sed feugiat libero mattis. Nam id mi ac leo iaculis volutpat. Maecenas nec enim ut mauris convallis auctor in sed purus. Nam porta magna vitae nisl tempus in eleifend felis viverra.&lt;/p&gt;
		&lt;/div&gt;
		&lt;span class=&quot;comment-more&quot;&gt;&lt;a href=&quot;#&quot;&gt;more&lt;/a&gt;&lt;/span&gt;
	&lt;/div&gt;
&lt;/div&gt;</pre>
<h3>Recommended Books on jQuery</h3>
<div class="book"><a href="http://www.amazon.com/gp/product/0596159773?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0596159773"><img src="http://eisabainyo.net/weblog/wp-content/uploads/2009/09/jquery-cookbook.jpg" alt="" title="jQuery Cookbook: Solutions &amp; Examples for jQuery Developers" width="90" height="118" class="alignnone size-full wp-image-1128" /><span>jQuery Cookbook: Solutions &#038; Examples for jQuery Developers</span></a><img src="http://www.assoc-amazon.com/e/ir?t=eisabainyonet-20&#038;l=as2&#038;o=1&#038;a=0596159773" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
</div>
<div class="book"><a href="http://www.amazon.com/gp/product/1933988355?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=1933988355"><img src="http://eisabainyo.net/weblog/wp-content/uploads/2009/09/jquery-in-action.jpg" alt="" title="jQuery in Action" width="90" height="111" class="alignnone size-full wp-image-1127" /><span>jQuery in Action</span></a><img src="http://www.assoc-amazon.com/e/ir?t=eisabainyonet-20&#038;l=as2&#038;o=1&#038;a=1933988355" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
</div>
<p>Read <a href="http://eisabainyo.net/weblog/2009/09/14/read-more-using-jquery-live-event/">Read more using jQuery live event</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/2006/01/26/dummy-text/" rel="bookmark" title="January 26, 2006">Dummy Text</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/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/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/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/04/07/back-to-top-link-with-jquery/" rel="bookmark" title="April 7, 2009">Back to top link with jQuery</a></li>
</ul><!-- Similar Posts took 55.205 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2009/09/14/read-more-using-jquery-live-event/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

