<?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>Michael Hartmayer - Portfolio</title>
	<atom:link href="http://www.michaelhartmayer.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaelhartmayer.com</link>
	<description>Have a Leet Smoothy</description>
	<lastBuildDate>Wed, 20 Jan 2010 04:20:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The 125k Challenge</title>
		<link>http://www.michaelhartmayer.com/notice/the-125k-challenge/</link>
		<comments>http://www.michaelhartmayer.com/notice/the-125k-challenge/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 04:20:37 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[Notice]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=431</guid>
		<description><![CDATA[This is a new thing I&#8217;m working on. My goal is to make $125,000 in one year, using only my own projects. Check it out!
Official Website: http://www.125kchallenge.com/
YouTube: http://www.youtube.com/125kchallenge/
Twitter: http://www.twitter.com/125kchallenge/



Share and Enjoy:


	
	
	
	
	
	
	
	
	
	
	


]]></description>
			<content:encoded><![CDATA[<p>This is a new thing I&#8217;m working on. My goal is to make $125,000 in one year, using only my own projects. Check it out!</p>
<p>Official Website: <a title="The 125k Challenge Official Website" href="http://www.125kchallenge.com/" target="_blank">http://www.125kchallenge.com/</a><br />
YouTube: <a title="The 125k Challenge on YouTube" href="http://www.youtube.com/125kchallenge/" target="_blank">http://www.youtube.com/125kchallenge/</a><br />
Twitter: <a title="The 125k Challenge on Twitter" href="http://www.twitter.com/125kchallenge/" target="_blank">http://www.twitter.com/125kchallenge/</a></p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Fthe-125k-challenge%2F&amp;title=The%20125k%20Challenge&amp;bodytext=This%20is%20a%20new%20thing%20I%27m%20working%20on.%20My%20goal%20is%20to%20make%20%24125%2C000%20in%20one%20year%2C%20using%20only%20my%20own%20projects.%20Check%20it%20out%21%0D%0A%0D%0AOfficial%20Website%3A%20http%3A%2F%2Fwww.125kchallenge.com%2F%0D%0AYouTube%3A%20http%3A%2F%2Fwww.youtube.com%2F125kchallenge%2F%0D%0ATwitter%3A%20http%3A%2F%2Fwww.twitter.com" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Fthe-125k-challenge%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Fthe-125k-challenge%2F&amp;title=The%20125k%20Challenge&amp;notes=This%20is%20a%20new%20thing%20I%27m%20working%20on.%20My%20goal%20is%20to%20make%20%24125%2C000%20in%20one%20year%2C%20using%20only%20my%20own%20projects.%20Check%20it%20out%21%0D%0A%0D%0AOfficial%20Website%3A%20http%3A%2F%2Fwww.125kchallenge.com%2F%0D%0AYouTube%3A%20http%3A%2F%2Fwww.youtube.com%2F125kchallenge%2F%0D%0ATwitter%3A%20http%3A%2F%2Fwww.twitter.com" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Fthe-125k-challenge%2F&amp;t=The%20125k%20Challenge" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Fthe-125k-challenge%2F&amp;title=The%20125k%20Challenge" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Fthe-125k-challenge%2F&amp;title=The%20125k%20Challenge&amp;annotation=This%20is%20a%20new%20thing%20I%27m%20working%20on.%20My%20goal%20is%20to%20make%20%24125%2C000%20in%20one%20year%2C%20using%20only%20my%20own%20projects.%20Check%20it%20out%21%0D%0A%0D%0AOfficial%20Website%3A%20http%3A%2F%2Fwww.125kchallenge.com%2F%0D%0AYouTube%3A%20http%3A%2F%2Fwww.youtube.com%2F125kchallenge%2F%0D%0ATwitter%3A%20http%3A%2F%2Fwww.twitter.com" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Fthe-125k-challenge%2F&amp;title=The%20125k%20Challenge&amp;source=Michael+Hartmayer+-+Portfolio+Have+a+Leet+Smoothy&amp;summary=This%20is%20a%20new%20thing%20I%27m%20working%20on.%20My%20goal%20is%20to%20make%20%24125%2C000%20in%20one%20year%2C%20using%20only%20my%20own%20projects.%20Check%20it%20out%21%0D%0A%0D%0AOfficial%20Website%3A%20http%3A%2F%2Fwww.125kchallenge.com%2F%0D%0AYouTube%3A%20http%3A%2F%2Fwww.youtube.com%2F125kchallenge%2F%0D%0ATwitter%3A%20http%3A%2F%2Fwww.twitter.com" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Fthe-125k-challenge%2F&amp;title=The%20125k%20Challenge" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Fthe-125k-challenge%2F&amp;t=The%20125k%20Challenge" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Fthe-125k-challenge%2F&amp;title=The%20125k%20Challenge" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Fthe-125k-challenge%2F&amp;title=The%20125k%20Challenge" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/notice/the-125k-challenge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working on New Portfolio Theme!</title>
		<link>http://www.michaelhartmayer.com/web-design/working-on-new-portfolio-theme/</link>
		<comments>http://www.michaelhartmayer.com/web-design/working-on-new-portfolio-theme/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 23:14:06 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Layout]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Wireframe]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=411</guid>
		<description><![CDATA[Working on a new theme for my Portfolio! The theme I&#8217;m currently using is just something I grabbed off some site, to get my portfolio up and running. Now that I have time to rework it, I&#8217;m putting a little extra time and effort into it. So far my process has been to create a [...]]]></description>
			<content:encoded><![CDATA[<p>Working on a new theme for my Portfolio! The theme I&#8217;m currently using is just something I grabbed off some site, to get my portfolio up and running. Now that I have time to rework it, I&#8217;m putting a little extra time and effort into it. So far my process has been to create a wire frame of the elements, and markup some basic functionality (I created an asset list document to work from, before creating the wires). This will make designing a whole lot easier and permit me to only have to worry about the &#8220;pretty factor&#8221;, since I&#8217;ve already mapped out my functionality and flow.</p>
<p>Check out my progress:</p>
<p><strong>Wireframes (Layout):</strong></p>
<p><a href="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newSite.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-412" title="Wireframe: Layout" src="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newSite-300x170.jpg" alt="Wireframe: Layout" width="300" height="170" /></a></p>
<p><strong>Wireframe (Layout + Navigation Example):</strong></p>
<p><a href="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newSite_NAV.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-413" title="Wireframe: New Layout with Navigation" src="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newSite_NAV-300x262.jpg" alt="Wireframe: New Layout with Navigation" width="300" height="262" /></a></p>
<p><strong>Designing the Background:</strong></p>
<p><a href="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newBackground.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-414" title="Design: Background" src="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newBackground-300x300.jpg" alt="Design: Background" width="300" height="300" /></a></p>
<p><em>( I&#8217;ve already got grid lines in place to make sure everything will work with 960px. width )</em></p>
<p><strong>More Background Work + Some Layout:</strong></p>
<p><a href="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0004.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-415" title="Design and Layout: New Portfolio" src="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0004-300x300.jpg" alt="Design and Layout: New Portfolio" width="300" height="300" /></a></p>
<p><strong>Trying to find a good way to present the navigation:</strong></p>
<p><a href="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0004_Nav.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-416" title="UI - Designing Navigation" src="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0004_Nav-300x89.jpg" alt="UI - Designing Navigation" width="300" height="89" /></a></p>
<p><strong>Started Filling in the Content UI:</strong></p>
<p><strong><a href="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0005.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-420" title="New Portfolio Theme: Content and UI" src="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0005-300x300.jpg" alt="New Portfolio Theme: Content and UI" width="300" height="300" /></a></strong></p>
<p><strong>Continued:</strong></p>
<p><strong><a href="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0007.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-422" title="New Portfolio Theme: UI and Design Continued" src="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0007-300x300.jpg" alt="New Portfolio Theme: UI and Design Continued" width="300" height="300" /></a></strong></p>
<p><strong>Continued:</strong></p>
<p><strong><a href="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0009.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-425" title="New Portfolio Theme: UI and Design Continued" src="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0009-300x300.jpg" alt="New Portfolio Theme - UI and Design Continued" width="300" height="300" /></a></strong></p>
<p><strong>Continued:</strong></p>
<p><strong><a href="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0010.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-427" title="New Portfolio Theme: UI and Design Continued" src="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0010-300x300.jpg" alt="New Portfolio Theme: UI and Design Continued" width="300" height="300" /></a></strong></p>
<p><strong>Continued:</strong></p>
<p><strong><a href="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0011.jpg" rel="lightbox"><img class="alignnone size-medium wp-image-429" title="New Portfolio Theme: Created Custom Icons" src="http://www.michaelhartmayer.com/wp-content/uploads/2009/12/newLayout_0011-300x300.jpg" alt="New Portfolio Theme: Created Custom Icons" width="300" height="300" /></a></strong></p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fworking-on-new-portfolio-theme%2F&amp;title=Working%20on%20New%20Portfolio%20Theme%21&amp;bodytext=Working%20on%20a%20new%20theme%20for%20my%20Portfolio%21%20The%20theme%20I%27m%20currently%20using%20is%20just%20something%20I%20grabbed%20off%20some%20site%2C%20to%20get%20my%20portfolio%20up%20and%20running.%20Now%20that%20I%20have%20time%20to%20rework%20it%2C%20I%27m%20putting%20a%20little%20extra%20time%20and%20effort%20into%20it.%20So%20far%20my%20pro" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fworking-on-new-portfolio-theme%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fworking-on-new-portfolio-theme%2F&amp;title=Working%20on%20New%20Portfolio%20Theme%21&amp;notes=Working%20on%20a%20new%20theme%20for%20my%20Portfolio%21%20The%20theme%20I%27m%20currently%20using%20is%20just%20something%20I%20grabbed%20off%20some%20site%2C%20to%20get%20my%20portfolio%20up%20and%20running.%20Now%20that%20I%20have%20time%20to%20rework%20it%2C%20I%27m%20putting%20a%20little%20extra%20time%20and%20effort%20into%20it.%20So%20far%20my%20pro" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fworking-on-new-portfolio-theme%2F&amp;t=Working%20on%20New%20Portfolio%20Theme%21" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fworking-on-new-portfolio-theme%2F&amp;title=Working%20on%20New%20Portfolio%20Theme%21" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fworking-on-new-portfolio-theme%2F&amp;title=Working%20on%20New%20Portfolio%20Theme%21&amp;annotation=Working%20on%20a%20new%20theme%20for%20my%20Portfolio%21%20The%20theme%20I%27m%20currently%20using%20is%20just%20something%20I%20grabbed%20off%20some%20site%2C%20to%20get%20my%20portfolio%20up%20and%20running.%20Now%20that%20I%20have%20time%20to%20rework%20it%2C%20I%27m%20putting%20a%20little%20extra%20time%20and%20effort%20into%20it.%20So%20far%20my%20pro" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fworking-on-new-portfolio-theme%2F&amp;title=Working%20on%20New%20Portfolio%20Theme%21&amp;source=Michael+Hartmayer+-+Portfolio+Have+a+Leet+Smoothy&amp;summary=Working%20on%20a%20new%20theme%20for%20my%20Portfolio%21%20The%20theme%20I%27m%20currently%20using%20is%20just%20something%20I%20grabbed%20off%20some%20site%2C%20to%20get%20my%20portfolio%20up%20and%20running.%20Now%20that%20I%20have%20time%20to%20rework%20it%2C%20I%27m%20putting%20a%20little%20extra%20time%20and%20effort%20into%20it.%20So%20far%20my%20pro" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fworking-on-new-portfolio-theme%2F&amp;title=Working%20on%20New%20Portfolio%20Theme%21" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fworking-on-new-portfolio-theme%2F&amp;t=Working%20on%20New%20Portfolio%20Theme%21" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fworking-on-new-portfolio-theme%2F&amp;title=Working%20on%20New%20Portfolio%20Theme%21" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fworking-on-new-portfolio-theme%2F&amp;title=Working%20on%20New%20Portfolio%20Theme%21" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/web-design/working-on-new-portfolio-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IE6 / IE7 jQuery Fix: Anchor Image Clickable Area</title>
		<link>http://www.michaelhartmayer.com/web-design/ie6-ie7-jquery-fix-anchor-image-clickable-area/</link>
		<comments>http://www.michaelhartmayer.com/web-design/ie6-ie7-jquery-fix-anchor-image-clickable-area/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 18:45:31 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[ie7]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=396</guid>
		<description><![CDATA[IE6 and IE7 both experience a problem in which images inside of block elements inside of anchors lose their click ability. Here&#8217;s an example:

&#60;a href=&#34;rss-icon.png&#34;&#62;
	&#60;span style=&#34;display:block; width:100px; height:100px;&#34;&#62;
		&#60;img src=&#34;someImage.png&#34; /&#62;
	&#60;/span&#62;
&#60;/a&#62;

Every area of the link remains click-able except for the surface consumed by someImage.png. (Note, this problem will not show in IE8, or FF)
Here&#8217;s a very [...]]]></description>
			<content:encoded><![CDATA[<p>IE6 and IE7 both experience a problem in which images inside of block elements inside of anchors lose their click ability. Here&#8217;s an example:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;rss-icon.png&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display:block; width:100px; height:100px;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;someImage.png&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Every area of the link remains click-able except for the surface consumed by someImage.png. (Note, this problem will not show in IE8, or FF)</p>
<p>Here&#8217;s a very small jQuery plugin I wrote to fix this particular issue.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$.<span style="color: #660066;">fn</span>.<span style="color: #660066;">fixClick</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>
				.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>cursor<span style="color: #339933;">:</span><span style="color: #3366CC;">'pointer'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
				.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					window.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'href'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Simply select your target element(s) and use this plugin to make the entire anchor click-able again. Here&#8217;s an example:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fixClick</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area&amp;bodytext=IE6%20and%20IE7%20both%20experience%20a%20problem%20in%20which%20images%20inside%20of%20block%20elements%20inside%20of%20anchors%20lose%20their%20click%20ability.%20Here%27s%20an%20example%3A%0D%0A%0D%0A%0D%0A%0D%0A%09%0D%0A%09%09%0D%0A%09%0D%0A%0D%0A%0D%0A%0D%0AEvery%20area%20of%20the%20link%20remains%20click-able%20except%20for%20the%20surface%20consumed%20by%20someImag" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area&amp;notes=IE6%20and%20IE7%20both%20experience%20a%20problem%20in%20which%20images%20inside%20of%20block%20elements%20inside%20of%20anchors%20lose%20their%20click%20ability.%20Here%27s%20an%20example%3A%0D%0A%0D%0A%0D%0A%0D%0A%09%0D%0A%09%09%0D%0A%09%0D%0A%0D%0A%0D%0A%0D%0AEvery%20area%20of%20the%20link%20remains%20click-able%20except%20for%20the%20surface%20consumed%20by%20someImag" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;t=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area&amp;annotation=IE6%20and%20IE7%20both%20experience%20a%20problem%20in%20which%20images%20inside%20of%20block%20elements%20inside%20of%20anchors%20lose%20their%20click%20ability.%20Here%27s%20an%20example%3A%0D%0A%0D%0A%0D%0A%0D%0A%09%0D%0A%09%09%0D%0A%09%0D%0A%0D%0A%0D%0A%0D%0AEvery%20area%20of%20the%20link%20remains%20click-able%20except%20for%20the%20surface%20consumed%20by%20someImag" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area&amp;source=Michael+Hartmayer+-+Portfolio+Have+a+Leet+Smoothy&amp;summary=IE6%20and%20IE7%20both%20experience%20a%20problem%20in%20which%20images%20inside%20of%20block%20elements%20inside%20of%20anchors%20lose%20their%20click%20ability.%20Here%27s%20an%20example%3A%0D%0A%0D%0A%0D%0A%0D%0A%09%0D%0A%09%09%0D%0A%09%0D%0A%0D%0A%0D%0A%0D%0AEvery%20area%20of%20the%20link%20remains%20click-able%20except%20for%20the%20surface%20consumed%20by%20someImag" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;t=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/web-design/ie6-ie7-jquery-fix-anchor-image-clickable-area/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Scripting for Smarties : Application Portability 101</title>
		<link>http://www.michaelhartmayer.com/php/scripting-for-smarties-application-portability-101/</link>
		<comments>http://www.michaelhartmayer.com/php/scripting-for-smarties-application-portability-101/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 17:42:15 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripting for Smarties]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=384</guid>
		<description><![CDATA[


Here&#8217;s the first &#8216;tutorial&#8217;-esque video that I&#8217;ve published in my new Channel Scripting for Smarties.
Enjoy~



Share and Enjoy:


	
	
	
	
	
	
	
	
	
	
	


]]></description>
			<content:encoded><![CDATA[<div style="text-align:center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/IjGPMf70-d0&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/IjGPMf70-d0&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object>
</div>
<p><BR /><br />
Here&#8217;s the first &#8216;tutorial&#8217;-esque video that I&#8217;ve published in my new Channel <a title="Scripting for Smarties on YouTube" href="http://www.youtube.com/ScriptingForSmarties/" target="_blank">Scripting for Smarties</a>.</p>
<p>Enjoy~</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fscripting-for-smarties-application-portability-101%2F&amp;title=Scripting%20for%20Smarties%20%3A%20Application%20Portability%20101&amp;bodytext=%0D%0A%0D%0A%0D%0AHere%27s%20the%20first%20%27tutorial%27-esque%20video%20that%20I%27ve%20published%20in%20my%20new%20Channel%20Scripting%20for%20Smarties.%0D%0A%0D%0AEnjoy%7E" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fscripting-for-smarties-application-portability-101%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fscripting-for-smarties-application-portability-101%2F&amp;title=Scripting%20for%20Smarties%20%3A%20Application%20Portability%20101&amp;notes=%0D%0A%0D%0A%0D%0AHere%27s%20the%20first%20%27tutorial%27-esque%20video%20that%20I%27ve%20published%20in%20my%20new%20Channel%20Scripting%20for%20Smarties.%0D%0A%0D%0AEnjoy%7E" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fscripting-for-smarties-application-portability-101%2F&amp;t=Scripting%20for%20Smarties%20%3A%20Application%20Portability%20101" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fscripting-for-smarties-application-portability-101%2F&amp;title=Scripting%20for%20Smarties%20%3A%20Application%20Portability%20101" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fscripting-for-smarties-application-portability-101%2F&amp;title=Scripting%20for%20Smarties%20%3A%20Application%20Portability%20101&amp;annotation=%0D%0A%0D%0A%0D%0AHere%27s%20the%20first%20%27tutorial%27-esque%20video%20that%20I%27ve%20published%20in%20my%20new%20Channel%20Scripting%20for%20Smarties.%0D%0A%0D%0AEnjoy%7E" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fscripting-for-smarties-application-portability-101%2F&amp;title=Scripting%20for%20Smarties%20%3A%20Application%20Portability%20101&amp;source=Michael+Hartmayer+-+Portfolio+Have+a+Leet+Smoothy&amp;summary=%0D%0A%0D%0A%0D%0AHere%27s%20the%20first%20%27tutorial%27-esque%20video%20that%20I%27ve%20published%20in%20my%20new%20Channel%20Scripting%20for%20Smarties.%0D%0A%0D%0AEnjoy%7E" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fscripting-for-smarties-application-portability-101%2F&amp;title=Scripting%20for%20Smarties%20%3A%20Application%20Portability%20101" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fscripting-for-smarties-application-portability-101%2F&amp;t=Scripting%20for%20Smarties%20%3A%20Application%20Portability%20101" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fscripting-for-smarties-application-portability-101%2F&amp;title=Scripting%20for%20Smarties%20%3A%20Application%20Portability%20101" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fscripting-for-smarties-application-portability-101%2F&amp;title=Scripting%20for%20Smarties%20%3A%20Application%20Portability%20101" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/php/scripting-for-smarties-application-portability-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Database Class</title>
		<link>http://www.michaelhartmayer.com/php/php-database-class/</link>
		<comments>http://www.michaelhartmayer.com/php/php-database-class/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 17:09:36 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[Singleton]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=369</guid>
		<description><![CDATA[I just recently wrote a brand new Database class to add to my PHP library. The old one was starting to get stale. This class is capable of taking advantage of the Singleton design pattern.

&#60;?php
&#160;
/**
 * @author Michael Hartmayer (michaelhartmayer[at]gmail.com)
 * @copyright 2009
 */
&#160;
	class Db &#123;
&#160;
		static $ref;				// Database Resource
&#160;
		private $user 	= 'root';		// Username
		private $pass 	= [...]]]></description>
			<content:encoded><![CDATA[<p>I just recently wrote a brand new Database class to add to my PHP library. The old one was starting to get stale. This class is capable of taking advantage of the Singleton design pattern.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * @author Michael Hartmayer (michaelhartmayer[at]gmail.com)
 * @copyright 2009
 */</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">class</span> Db <span style="color: #009900;">&#123;</span>
&nbsp;
		static <span style="color: #000088;">$ref</span><span style="color: #339933;">;</span>				<span style="color: #666666; font-style: italic;">// Database Resource</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$user</span> 	<span style="color: #339933;">=</span> <span style="color: #0000ff;">'root'</span><span style="color: #339933;">;</span>		<span style="color: #666666; font-style: italic;">// Username</span>
		<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$pass</span> 	<span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>			<span style="color: #666666; font-style: italic;">// Password</span>
		<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$host</span> 	<span style="color: #339933;">=</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">;</span>		<span style="color: #666666; font-style: italic;">// Host</span>
		<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$db</span> 	<span style="color: #339933;">=</span> <span style="color: #0000ff;">'test'</span><span style="color: #339933;">;</span>		<span style="color: #666666; font-style: italic;">// Database</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$err</span> 	<span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>		<span style="color: #666666; font-style: italic;">// Error Log</span>
		<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$errHalt</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>		<span style="color: #666666; font-style: italic;">// Toggle: Halt on DB Error?</span>
&nbsp;
		static <span style="color: #000088;">$q</span><span style="color: #339933;">;</span>				<span style="color: #666666; font-style: italic;">// Last Query</span>
		static <span style="color: #000088;">$r</span><span style="color: #339933;">;</span>				<span style="color: #666666; font-style: italic;">// Last Results</span>
&nbsp;
		static <span style="color: #000088;">$singleton</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Db<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getInstance<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$singleton</span><span style="color: #009900;">&#41;</span>
				<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$singleton</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$singleton</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setUser<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod </span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setPass<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pass</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setHost<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">host</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setDb<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setAll<span style="color: #009900;">&#40;</span><span style="color: #000088;">$h</span><span style="color: #339933;">,</span><span style="color: #000088;">$u</span><span style="color: #339933;">,</span><span style="color: #000088;">$p</span><span style="color: #339933;">,</span><span style="color: #000088;">$d</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">host</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$h</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$u</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pass</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$p</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$d</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> doConnect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">doDisconnect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">host</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pass</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
				<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dbErr</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!@</span><span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>			
				<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dbErr</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> doDisconnect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getRef<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
			<span style="color: #b1b100;">return</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> dbSet<span style="color: #009900;">&#40;</span><span style="color: #000088;">$q</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">q</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$q</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">r</span><span style="color: #339933;">=@</span><span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">q</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
				<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dbErr</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> dbGet<span style="color: #009900;">&#40;</span><span style="color: #000088;">$q</span><span style="color: #339933;">,</span><span style="color: #000088;">$type</span><span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
			<span style="color: #b1b100;">switch</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'STR'</span><span style="color: #339933;">:</span>
					<span style="color: #000088;">$resultType</span> <span style="color: #339933;">=</span> MYSQL_ASSOC<span style="color: #339933;">;</span>
					<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'INT'</span><span style="color: #339933;">:</span>
					<span style="color: #000088;">$resultType</span> <span style="color: #339933;">=</span> MYSQL_NUM<span style="color: #339933;">;</span>
					<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>
					<span style="color: #000088;">$resultType</span> <span style="color: #339933;">=</span> MYSQL_BOTH<span style="color: #339933;">;</span>
					<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">q</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$q</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">r</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">q</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
				<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dbErr</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$resultArr</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$makeDbArr</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">r</span><span style="color: #339933;">,</span><span style="color: #000088;">$resultType</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$resultArr</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$makeDbArr</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endWhile</span>
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$resultArr</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> dbCount<span style="color: #009900;">&#40;</span><span style="color: #000088;">$table</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matchPartialQuery</span><span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">q</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT COUNT(*) AS 'COUNT' FROM `<span style="color: #006699; font-weight: bold;">$table</span>` <span style="color: #006699; font-weight: bold;">$matchPartialQuery</span>;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">r</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dbGet</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">q</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
				<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">r</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'COUNT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dbErr</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">err</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> dbErr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$err</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$err</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">err</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$err</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errHalt</span><span style="color: #339933;">==</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&gt;&gt; System has halted on Db Error. &lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&gt;&gt; Error Log:&lt;br /&gt;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$err</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #990000;">exit</span><span style="color: #339933;">;</span>	
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> err<span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> strClean<span style="color: #009900;">&#40;</span><span style="color: #000088;">$str</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$str</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endMethod</span>
&nbsp;
	<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//endClass</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-database-class%2F&amp;title=PHP%20Database%20Class&amp;bodytext=I%20just%20recently%20wrote%20a%20brand%20new%20Database%20class%20to%20add%20to%20my%20PHP%20library.%20The%20old%20one%20was%20starting%20to%20get%20stale.%20This%20class%20is%20capable%20of%20taking%20advantage%20of%20the%20Singleton%20design%20pattern.%0D%0A%0D%0A%0D%0A%0D%0A" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-database-class%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-database-class%2F&amp;title=PHP%20Database%20Class&amp;notes=I%20just%20recently%20wrote%20a%20brand%20new%20Database%20class%20to%20add%20to%20my%20PHP%20library.%20The%20old%20one%20was%20starting%20to%20get%20stale.%20This%20class%20is%20capable%20of%20taking%20advantage%20of%20the%20Singleton%20design%20pattern.%0D%0A%0D%0A%0D%0A%0D%0A" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-database-class%2F&amp;t=PHP%20Database%20Class" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-database-class%2F&amp;title=PHP%20Database%20Class" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-database-class%2F&amp;title=PHP%20Database%20Class&amp;annotation=I%20just%20recently%20wrote%20a%20brand%20new%20Database%20class%20to%20add%20to%20my%20PHP%20library.%20The%20old%20one%20was%20starting%20to%20get%20stale.%20This%20class%20is%20capable%20of%20taking%20advantage%20of%20the%20Singleton%20design%20pattern.%0D%0A%0D%0A%0D%0A%0D%0A" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-database-class%2F&amp;title=PHP%20Database%20Class&amp;source=Michael+Hartmayer+-+Portfolio+Have+a+Leet+Smoothy&amp;summary=I%20just%20recently%20wrote%20a%20brand%20new%20Database%20class%20to%20add%20to%20my%20PHP%20library.%20The%20old%20one%20was%20starting%20to%20get%20stale.%20This%20class%20is%20capable%20of%20taking%20advantage%20of%20the%20Singleton%20design%20pattern.%0D%0A%0D%0A%0D%0A%0D%0A" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-database-class%2F&amp;title=PHP%20Database%20Class" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-database-class%2F&amp;t=PHP%20Database%20Class" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-database-class%2F&amp;title=PHP%20Database%20Class" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-database-class%2F&amp;title=PHP%20Database%20Class" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/php/php-database-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>960gs Margin Mod</title>
		<link>http://www.michaelhartmayer.com/css/960gs-margin-mod/</link>
		<comments>http://www.michaelhartmayer.com/css/960gs-margin-mod/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 21:31:07 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[960]]></category>
		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=359</guid>
		<description><![CDATA[Lately I&#8217;ve been working with the marvelously easy to use and understand CSS framework, 960 Grid System. After getting started with it, I very quickly noticed that, while easy and efficient, it has a flaw. You absolutely can NOT extend your elements to end after a margin, touching the next grid element. And so, one [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve been working with the marvelously easy to use and understand CSS framework, <a href="http://960.gs" title="960 Grid System" target="_blank">960 Grid System</a>. After getting started with it, I very quickly noticed that, while easy and efficient, it has a flaw. You absolutely can NOT extend your elements to end after a margin, touching the next grid element. And so, one becomes effectively shackled to having margins between any horizontally placed grid elements.</p>
<p>Here&#8217;s a quick Mod that I wrote that will allow you to negate that problem, without modifying the 960gs CSS itself. Also, it is important to note, that while this does allow you to push your grid class over the margin, you still can&#8217;t pull the next element back. Still, another mod could be written using the same flavor to accomplish that as well.</p>
<p>So, without further adieu, here it is:</p>
<p>960.overExtend.css</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/*
&nbsp;
Modifies the 960gs to allow elements to carry over
into the margins, so that they may snugly touch
the next grid over. Simply use the appropriate grid,
as you normally would, and then attach the additional
overExtend class to it, to make it over extend into
the margin. 
&nbsp;
Example:
&nbsp;
&lt;div id=&quot;myContainer&quot; class=&quot;grid_5 grid_5_overExtend&quot;&gt;
...
&lt;/div&gt;
&nbsp;
*/</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Margin Mod 12 Col */</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #6666ff;">.grid_1_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">80px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #6666ff;">.grid_2_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">160px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #6666ff;">.grid_3_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">240px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #6666ff;">.grid_4_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">320px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #6666ff;">.grid_5_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">400px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #6666ff;">.grid_6_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">480px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #6666ff;">.grid_7_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">560px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #6666ff;">.grid_8_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">640px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #6666ff;">.grid_9_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">720px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #6666ff;">.grid_10_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">800px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #6666ff;">.grid_11_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">880px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Margin Mod 16 Col */</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_1_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">60px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_2_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">120px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_3_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">180px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_4_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">240px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_5_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">300px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_6_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">360px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_7_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">420px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_8_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">480px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_9_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">540px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_10_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">600px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_11_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">660px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_12_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">720px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_13_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">780px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_14_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">840px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.container_16</span> <span style="color: #6666ff;">.grid_15_overExtend</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">900px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-10px</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>




Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fcss%2F960gs-margin-mod%2F&amp;title=960gs%20Margin%20Mod&amp;bodytext=Lately%20I%27ve%20been%20working%20with%20the%20marvelously%20easy%20to%20use%20and%20understand%20CSS%20framework%2C%20960%20Grid%20System.%20After%20getting%20started%20with%20it%2C%20I%20very%20quickly%20noticed%20that%2C%20while%20easy%20and%20efficient%2C%20it%20has%20a%20flaw.%20You%20absolutely%20can%20NOT%20extend%20your%20elements%20" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fcss%2F960gs-margin-mod%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fcss%2F960gs-margin-mod%2F&amp;title=960gs%20Margin%20Mod&amp;notes=Lately%20I%27ve%20been%20working%20with%20the%20marvelously%20easy%20to%20use%20and%20understand%20CSS%20framework%2C%20960%20Grid%20System.%20After%20getting%20started%20with%20it%2C%20I%20very%20quickly%20noticed%20that%2C%20while%20easy%20and%20efficient%2C%20it%20has%20a%20flaw.%20You%20absolutely%20can%20NOT%20extend%20your%20elements%20" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fcss%2F960gs-margin-mod%2F&amp;t=960gs%20Margin%20Mod" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fcss%2F960gs-margin-mod%2F&amp;title=960gs%20Margin%20Mod" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fcss%2F960gs-margin-mod%2F&amp;title=960gs%20Margin%20Mod&amp;annotation=Lately%20I%27ve%20been%20working%20with%20the%20marvelously%20easy%20to%20use%20and%20understand%20CSS%20framework%2C%20960%20Grid%20System.%20After%20getting%20started%20with%20it%2C%20I%20very%20quickly%20noticed%20that%2C%20while%20easy%20and%20efficient%2C%20it%20has%20a%20flaw.%20You%20absolutely%20can%20NOT%20extend%20your%20elements%20" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fcss%2F960gs-margin-mod%2F&amp;title=960gs%20Margin%20Mod&amp;source=Michael+Hartmayer+-+Portfolio+Have+a+Leet+Smoothy&amp;summary=Lately%20I%27ve%20been%20working%20with%20the%20marvelously%20easy%20to%20use%20and%20understand%20CSS%20framework%2C%20960%20Grid%20System.%20After%20getting%20started%20with%20it%2C%20I%20very%20quickly%20noticed%20that%2C%20while%20easy%20and%20efficient%2C%20it%20has%20a%20flaw.%20You%20absolutely%20can%20NOT%20extend%20your%20elements%20" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fcss%2F960gs-margin-mod%2F&amp;title=960gs%20Margin%20Mod" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fcss%2F960gs-margin-mod%2F&amp;t=960gs%20Margin%20Mod" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fcss%2F960gs-margin-mod%2F&amp;title=960gs%20Margin%20Mod" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fcss%2F960gs-margin-mod%2F&amp;title=960gs%20Margin%20Mod" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/css/960gs-margin-mod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alternating Styles in jQuery (Plug-In)</title>
		<link>http://www.michaelhartmayer.com/javascript/alternating-styles-jquery-plugin/</link>
		<comments>http://www.michaelhartmayer.com/javascript/alternating-styles-jquery-plugin/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 18:40:02 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=345</guid>
		<description><![CDATA[This is a little script that I wrote, that lets you easily alternate the style of repeating class elements, or w/e elements you want to select. This is particularly useful for lists, and the like.

function&#40;$&#41;&#123;
$.fn.styleAlternation = function&#40;aClass, bClass&#41; &#123;
    var i = 0;
    return this.each&#40;function&#40;&#41; &#123;
    [...]]]></description>
			<content:encoded><![CDATA[<p>This is a little script that I wrote, that lets you easily alternate the style of repeating class elements, or w/e elements you want to select. This is particularly useful for lists, and the like.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
$.<span style="color: #660066;">fn</span>.<span style="color: #660066;">styleAlternation</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>aClass<span style="color: #339933;">,</span> bClass<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">++</span>i <span style="color: #339933;">%</span> <span style="color: #CC0000;">2</span> <span style="color: #339933;">!=</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">&amp;&amp;</span> aClass<span style="color: #339933;">!=</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span>aClass<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>bClass<span style="color: #339933;">!=</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span>bClass<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The usage is very simple. Here&#8217;s the JavaScript:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#awesomeTable tr&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">styleAlternation</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cssClass1&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;cssClass2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>From there, all you need to do is create your CSS. Example:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.cssClass1</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#444</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.cssClass2</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#999</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Here&#8217;s a screenshot:<br />
<a href="http://www.michaelhartmayer.com/wp-content/uploads/2009/07/tableSample.JPG" rel="lightbox"><img src="http://www.michaelhartmayer.com/wp-content/uploads/2009/07/tableSample.JPG" alt="Alternation Demo" title="Alternation Demo" width="301" height="263" class="alignnone size-full wp-image-353" /></a></p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Falternating-styles-jquery-plugin%2F&amp;title=Alternating%20Styles%20in%20jQuery%20%28Plug-In%29&amp;bodytext=This%20is%20a%20little%20script%20that%20I%20wrote%2C%20that%20lets%20you%20easily%20alternate%20the%20style%20of%20repeating%20class%20elements%2C%20or%20w%2Fe%20elements%20you%20want%20to%20select.%20This%20is%20particularly%20useful%20for%20lists%2C%20and%20the%20like.%0D%0A%0D%0A%0D%0Afunction%28%24%29%7B%0D%0A%24.fn.styleAlternation%20%3D%20function%28a" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Falternating-styles-jquery-plugin%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Falternating-styles-jquery-plugin%2F&amp;title=Alternating%20Styles%20in%20jQuery%20%28Plug-In%29&amp;notes=This%20is%20a%20little%20script%20that%20I%20wrote%2C%20that%20lets%20you%20easily%20alternate%20the%20style%20of%20repeating%20class%20elements%2C%20or%20w%2Fe%20elements%20you%20want%20to%20select.%20This%20is%20particularly%20useful%20for%20lists%2C%20and%20the%20like.%0D%0A%0D%0A%0D%0Afunction%28%24%29%7B%0D%0A%24.fn.styleAlternation%20%3D%20function%28a" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Falternating-styles-jquery-plugin%2F&amp;t=Alternating%20Styles%20in%20jQuery%20%28Plug-In%29" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Falternating-styles-jquery-plugin%2F&amp;title=Alternating%20Styles%20in%20jQuery%20%28Plug-In%29" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Falternating-styles-jquery-plugin%2F&amp;title=Alternating%20Styles%20in%20jQuery%20%28Plug-In%29&amp;annotation=This%20is%20a%20little%20script%20that%20I%20wrote%2C%20that%20lets%20you%20easily%20alternate%20the%20style%20of%20repeating%20class%20elements%2C%20or%20w%2Fe%20elements%20you%20want%20to%20select.%20This%20is%20particularly%20useful%20for%20lists%2C%20and%20the%20like.%0D%0A%0D%0A%0D%0Afunction%28%24%29%7B%0D%0A%24.fn.styleAlternation%20%3D%20function%28a" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Falternating-styles-jquery-plugin%2F&amp;title=Alternating%20Styles%20in%20jQuery%20%28Plug-In%29&amp;source=Michael+Hartmayer+-+Portfolio+Have+a+Leet+Smoothy&amp;summary=This%20is%20a%20little%20script%20that%20I%20wrote%2C%20that%20lets%20you%20easily%20alternate%20the%20style%20of%20repeating%20class%20elements%2C%20or%20w%2Fe%20elements%20you%20want%20to%20select.%20This%20is%20particularly%20useful%20for%20lists%2C%20and%20the%20like.%0D%0A%0D%0A%0D%0Afunction%28%24%29%7B%0D%0A%24.fn.styleAlternation%20%3D%20function%28a" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Falternating-styles-jquery-plugin%2F&amp;title=Alternating%20Styles%20in%20jQuery%20%28Plug-In%29" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Falternating-styles-jquery-plugin%2F&amp;t=Alternating%20Styles%20in%20jQuery%20%28Plug-In%29" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Falternating-styles-jquery-plugin%2F&amp;title=Alternating%20Styles%20in%20jQuery%20%28Plug-In%29" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Falternating-styles-jquery-plugin%2F&amp;title=Alternating%20Styles%20in%20jQuery%20%28Plug-In%29" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/javascript/alternating-styles-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AJAX Calendar Loader Using jQuery</title>
		<link>http://www.michaelhartmayer.com/javascript/ajax-calendar-loader-jquery/</link>
		<comments>http://www.michaelhartmayer.com/javascript/ajax-calendar-loader-jquery/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 20:04:15 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=335</guid>
		<description><![CDATA[My good pal Austin needed help turning his static calendar into one that could change the month, using AJAX. The calendar itself was written in PHP. Here is the quick and easy solution I came up with for him, using jQuery:

$&#40;document&#41;.ready&#40;function&#40;&#41; &#123;
&#160;
   // Create Date Object
   var jsDateObject = new Date&#40;&#41;;
&#160;
 [...]]]></description>
			<content:encoded><![CDATA[<p>My good pal Austin needed help turning his static calendar into one that could change the month, using AJAX. The calendar itself was written in PHP. Here is the quick and easy solution I came up with for him, using jQuery:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
   <span style="color: #006600; font-style: italic;">// Create Date Object</span>
   <span style="color: #003366; font-weight: bold;">var</span> jsDateObject <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #006600; font-style: italic;">// Create Calendar Object ( Holds all your variables, etc )</span>
   <span style="color: #003366; font-weight: bold;">var</span> jsCalendar <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
       jsCalendar.<span style="color: #660066;">currentMonth</span> <span style="color: #339933;">=</span> jsDateObject.<span style="color: #660066;">getMonth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #006600; font-style: italic;">// Controls the NEXT button</span>
   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#jsCalendarNext&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #006600; font-style: italic;">// Update Active Month</span>
      jsCalendar.<span style="color: #660066;">currentMonth</span><span style="color: #339933;">++;</span>
         <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>jsCalendar.<span style="color: #660066;">currentMonth</span><span style="color: #339933;">&gt;</span><span style="color: #CC0000;">12</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> jsCalendar.<span style="color: #660066;">currentMonth</span><span style="color: #339933;">=</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #006600; font-style: italic;">// Get New Calendar</span>
      ajaxUpdateCalendar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #006600; font-style: italic;">// Controls the PREV button</span>
   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#jsCalendarPrev&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #006600; font-style: italic;">// Update Active Month</span>
      jsCalendar.<span style="color: #660066;">currentMonth</span><span style="color: #339933;">--;</span>
         <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>jsCalendar.<span style="color: #660066;">currentMonth</span><span style="color: #339933;">&lt;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> jsCalendar.<span style="color: #660066;">currentMonth</span><span style="color: #339933;">=</span><span style="color: #CC0000;">12</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #006600; font-style: italic;">// Get New Calendar</span>
      ajaxUpdateCalendar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #006600; font-style: italic;">// Use AJAX to update the Calendar</span>
   <span style="color: #003366; font-weight: bold;">function</span> ajaxUpdateCalendar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      $.<span style="color: #660066;">post</span><span style="color: #009900;">&#40;</span>
         <span style="color: #3366CC;">&quot;phpCalendarLoader.php&quot;</span><span style="color: #339933;">,</span>
         <span style="color: #009900;">&#123;</span> calendarMonth<span style="color: #339933;">:</span> jsCalendar.<span style="color: #660066;">currentMonth</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
         <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#jsCalendarContainer&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
         <span style="color: #3366CC;">&quot;html&quot;</span>
      <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>From here, all Austin had to do was set his <em>$month</em> variable to <em>$_POST['calendarMonth'];</em>.</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fajax-calendar-loader-jquery%2F&amp;title=AJAX%20Calendar%20Loader%20Using%20jQuery&amp;bodytext=My%20good%20pal%20Austin%20needed%20help%20turning%20his%20static%20calendar%20into%20one%20that%20could%20change%20the%20month%2C%20using%20AJAX.%20The%20calendar%20itself%20was%20written%20in%20PHP.%20Here%20is%20the%20quick%20and%20easy%20solution%20I%20came%20up%20with%20for%20him%2C%20using%20jQuery%3A%0D%0A%0D%0A%24%28document%29.ready%28functi" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fajax-calendar-loader-jquery%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fajax-calendar-loader-jquery%2F&amp;title=AJAX%20Calendar%20Loader%20Using%20jQuery&amp;notes=My%20good%20pal%20Austin%20needed%20help%20turning%20his%20static%20calendar%20into%20one%20that%20could%20change%20the%20month%2C%20using%20AJAX.%20The%20calendar%20itself%20was%20written%20in%20PHP.%20Here%20is%20the%20quick%20and%20easy%20solution%20I%20came%20up%20with%20for%20him%2C%20using%20jQuery%3A%0D%0A%0D%0A%24%28document%29.ready%28functi" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fajax-calendar-loader-jquery%2F&amp;t=AJAX%20Calendar%20Loader%20Using%20jQuery" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fajax-calendar-loader-jquery%2F&amp;title=AJAX%20Calendar%20Loader%20Using%20jQuery" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fajax-calendar-loader-jquery%2F&amp;title=AJAX%20Calendar%20Loader%20Using%20jQuery&amp;annotation=My%20good%20pal%20Austin%20needed%20help%20turning%20his%20static%20calendar%20into%20one%20that%20could%20change%20the%20month%2C%20using%20AJAX.%20The%20calendar%20itself%20was%20written%20in%20PHP.%20Here%20is%20the%20quick%20and%20easy%20solution%20I%20came%20up%20with%20for%20him%2C%20using%20jQuery%3A%0D%0A%0D%0A%24%28document%29.ready%28functi" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fajax-calendar-loader-jquery%2F&amp;title=AJAX%20Calendar%20Loader%20Using%20jQuery&amp;source=Michael+Hartmayer+-+Portfolio+Have+a+Leet+Smoothy&amp;summary=My%20good%20pal%20Austin%20needed%20help%20turning%20his%20static%20calendar%20into%20one%20that%20could%20change%20the%20month%2C%20using%20AJAX.%20The%20calendar%20itself%20was%20written%20in%20PHP.%20Here%20is%20the%20quick%20and%20easy%20solution%20I%20came%20up%20with%20for%20him%2C%20using%20jQuery%3A%0D%0A%0D%0A%24%28document%29.ready%28functi" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fajax-calendar-loader-jquery%2F&amp;title=AJAX%20Calendar%20Loader%20Using%20jQuery" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fajax-calendar-loader-jquery%2F&amp;t=AJAX%20Calendar%20Loader%20Using%20jQuery" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fajax-calendar-loader-jquery%2F&amp;title=AJAX%20Calendar%20Loader%20Using%20jQuery" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fajax-calendar-loader-jquery%2F&amp;title=AJAX%20Calendar%20Loader%20Using%20jQuery" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/javascript/ajax-calendar-loader-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Dad :)</title>
		<link>http://www.michaelhartmayer.com/fun/my-dad-william-hartmayer/</link>
		<comments>http://www.michaelhartmayer.com/fun/my-dad-william-hartmayer/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 09:55:41 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Hartmayer]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=326</guid>
		<description><![CDATA[Just got my Dad&#8217;s CD put on YouTube. Nothing fancy~
He&#8217;s been singing and composing all his life and put out two CD&#8217;s. This is a small preview of his &#8216;Golden Classics&#8217; Album. For more information about the CD, please get in touch with wolfhartmayer@gmail.com

» ( Listen to More ) «



Share and Enjoy:


	
	
	
	
	
	
	
	
	
	
	


]]></description>
			<content:encoded><![CDATA[<p>Just got my Dad&#8217;s CD put on YouTube. Nothing fancy~</p>
<p>He&#8217;s been singing and composing all his life and put out two CD&#8217;s. This is a small preview of his &#8216;Golden Classics&#8217; Album. For more information about the CD, please get in touch with wolfhartmayer@gmail.com</p>
<div style="margin: auto; width: 425px;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/hFfvT68NYV4&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/hFfvT68NYV4&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<div style="text-align:center;">» <a href="http://www.youtube.com/user/wolfhartmayer" target="_blank">( Listen to More )</a> «</div>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Fmy-dad-william-hartmayer%2F&amp;title=My%20Dad%20%3A%29&amp;bodytext=Just%20got%20my%20Dad%27s%20CD%20put%20on%20YouTube.%20Nothing%20fancy%7E%0D%0A%0D%0AHe%27s%20been%20singing%20and%20composing%20all%20his%20life%20and%20put%20out%20two%20CD%27s.%20This%20is%20a%20small%20preview%20of%20his%20%27Golden%20Classics%27%20Album.%20For%20more%20information%20about%20the%20CD%2C%20please%20get%20in%20touch%20with%20wolfhartmaye" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Fmy-dad-william-hartmayer%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Fmy-dad-william-hartmayer%2F&amp;title=My%20Dad%20%3A%29&amp;notes=Just%20got%20my%20Dad%27s%20CD%20put%20on%20YouTube.%20Nothing%20fancy%7E%0D%0A%0D%0AHe%27s%20been%20singing%20and%20composing%20all%20his%20life%20and%20put%20out%20two%20CD%27s.%20This%20is%20a%20small%20preview%20of%20his%20%27Golden%20Classics%27%20Album.%20For%20more%20information%20about%20the%20CD%2C%20please%20get%20in%20touch%20with%20wolfhartmaye" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Fmy-dad-william-hartmayer%2F&amp;t=My%20Dad%20%3A%29" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Fmy-dad-william-hartmayer%2F&amp;title=My%20Dad%20%3A%29" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Fmy-dad-william-hartmayer%2F&amp;title=My%20Dad%20%3A%29&amp;annotation=Just%20got%20my%20Dad%27s%20CD%20put%20on%20YouTube.%20Nothing%20fancy%7E%0D%0A%0D%0AHe%27s%20been%20singing%20and%20composing%20all%20his%20life%20and%20put%20out%20two%20CD%27s.%20This%20is%20a%20small%20preview%20of%20his%20%27Golden%20Classics%27%20Album.%20For%20more%20information%20about%20the%20CD%2C%20please%20get%20in%20touch%20with%20wolfhartmaye" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Fmy-dad-william-hartmayer%2F&amp;title=My%20Dad%20%3A%29&amp;source=Michael+Hartmayer+-+Portfolio+Have+a+Leet+Smoothy&amp;summary=Just%20got%20my%20Dad%27s%20CD%20put%20on%20YouTube.%20Nothing%20fancy%7E%0D%0A%0D%0AHe%27s%20been%20singing%20and%20composing%20all%20his%20life%20and%20put%20out%20two%20CD%27s.%20This%20is%20a%20small%20preview%20of%20his%20%27Golden%20Classics%27%20Album.%20For%20more%20information%20about%20the%20CD%2C%20please%20get%20in%20touch%20with%20wolfhartmaye" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Fmy-dad-william-hartmayer%2F&amp;title=My%20Dad%20%3A%29" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Fmy-dad-william-hartmayer%2F&amp;t=My%20Dad%20%3A%29" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Fmy-dad-william-hartmayer%2F&amp;title=My%20Dad%20%3A%29" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Fmy-dad-william-hartmayer%2F&amp;title=My%20Dad%20%3A%29" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/fun/my-dad-william-hartmayer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP LoadScript Class</title>
		<link>http://www.michaelhartmayer.com/php/php-loadscript-class/</link>
		<comments>http://www.michaelhartmayer.com/php/php-loadscript-class/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 03:46:16 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Optimization]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=289</guid>
		<description><![CDATA[This is a really handy class I wrote that loads all your scripts Server Side so that when your page loads there aren&#8217;t so many HTTP Requests. Useful if you&#8217;re trying to load 6 different js files and 4 different style sheets, or whatever. That&#8217;s 10 requests, completely gone. Just keep in mind that it [...]]]></description>
			<content:encoded><![CDATA[<p>This is a really handy class I wrote that loads all your scripts Server Side so that when your page loads there aren&#8217;t so many HTTP Requests. Useful if you&#8217;re trying to load 6 different js files and 4 different style sheets, or whatever. That&#8217;s 10 requests, completely gone. Just keep in mind that it dumps all your files straight into the html document- so, as long as you don&#8217;t have a problem with that, this is a great tool.</p>
<p>In addition, it&#8217;s really easy to add your own script types. Check out the script for details.</p>
<p>( Available At: <a title="PasteBin: LoadScript Class" rel="nofollow" href="http://pastebin.com/f5241789e" target="_blank">PasteBin: LoadScript Class</a> )</p>
<p>Usage:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
   <span style="color: #666666; font-style: italic;"># Include Class
</span>   <span style="color: #b1b100;">include_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class.scriptloader.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;"># Instantiate
</span>   <span style="color: #000088;">$jsLoader</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ScriptLoader<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'JS'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;"># Add Scripts
</span>   <span style="color: #000088;">$jsLoader</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addScript</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'my-javascript.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$jsLoader</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addScript</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$jsLoader</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addScript</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'other-scripts.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;"># Dump into Document
</span>   <span style="color: #000088;">$jsLoader</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">echoScripts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>On a quick note, it&#8217;d probably be a lot &#8216;neater&#8217; to mod-rewrite a php file to handle at least one request per script type. That way it doesn&#8217;t all get dumped straight into the page.</p>
<p>Something like:</p>
<p><em>RewriteRule ^script\.(.*)$ script-loader.php?type=$1 [L]</em></p>
<p>And for <strong>script-loader.php</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
   <span style="color: #b1b100;">switch</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'type'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'js'</span><span style="color: #339933;">:</span>
         <span style="color: #666666; font-style: italic;">// Load all of the JavaScript files here</span>
         <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>That way when you load something like <strong>script.js</strong> it will dump all of your java scripts into a &#8216;fake&#8217; file. Just make sure to use the default <em>$<span style="text-decoration: underline;">ScriptLoader</span>-&gt;type</em> (don&#8217;t set one when instantiating) if you are loading it from a <em>src=&#8221;foo.bar&#8221;</em>.</p>
<p>.. or something like that xD</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-loadscript-class%2F&amp;title=PHP%20LoadScript%20Class&amp;bodytext=This%20is%20a%20really%20handy%20class%20I%20wrote%20that%20loads%20all%20your%20scripts%20Server%20Side%20so%20that%20when%20your%20page%20loads%20there%20aren%27t%20so%20many%20HTTP%20Requests.%20Useful%20if%20you%27re%20trying%20to%20load%206%20different%20js%20files%20and%204%20different%20style%20sheets%2C%20or%20whatever.%20That%27s%2010%20re" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-loadscript-class%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-loadscript-class%2F&amp;title=PHP%20LoadScript%20Class&amp;notes=This%20is%20a%20really%20handy%20class%20I%20wrote%20that%20loads%20all%20your%20scripts%20Server%20Side%20so%20that%20when%20your%20page%20loads%20there%20aren%27t%20so%20many%20HTTP%20Requests.%20Useful%20if%20you%27re%20trying%20to%20load%206%20different%20js%20files%20and%204%20different%20style%20sheets%2C%20or%20whatever.%20That%27s%2010%20re" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-loadscript-class%2F&amp;t=PHP%20LoadScript%20Class" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-loadscript-class%2F&amp;title=PHP%20LoadScript%20Class" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-loadscript-class%2F&amp;title=PHP%20LoadScript%20Class&amp;annotation=This%20is%20a%20really%20handy%20class%20I%20wrote%20that%20loads%20all%20your%20scripts%20Server%20Side%20so%20that%20when%20your%20page%20loads%20there%20aren%27t%20so%20many%20HTTP%20Requests.%20Useful%20if%20you%27re%20trying%20to%20load%206%20different%20js%20files%20and%204%20different%20style%20sheets%2C%20or%20whatever.%20That%27s%2010%20re" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-loadscript-class%2F&amp;title=PHP%20LoadScript%20Class&amp;source=Michael+Hartmayer+-+Portfolio+Have+a+Leet+Smoothy&amp;summary=This%20is%20a%20really%20handy%20class%20I%20wrote%20that%20loads%20all%20your%20scripts%20Server%20Side%20so%20that%20when%20your%20page%20loads%20there%20aren%27t%20so%20many%20HTTP%20Requests.%20Useful%20if%20you%27re%20trying%20to%20load%206%20different%20js%20files%20and%204%20different%20style%20sheets%2C%20or%20whatever.%20That%27s%2010%20re" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-loadscript-class%2F&amp;title=PHP%20LoadScript%20Class" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-loadscript-class%2F&amp;t=PHP%20LoadScript%20Class" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-loadscript-class%2F&amp;title=PHP%20LoadScript%20Class" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-loadscript-class%2F&amp;title=PHP%20LoadScript%20Class" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/php/php-loadscript-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
