<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Webmuch</title>
	
	<link>http://webmuch.com</link>
	<description>Web Development and more...</description>
	<lastBuildDate>Sat, 31 Dec 2011 12:20:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/webmuch" /><feedburner:info uri="webmuch" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><feedburner:emailServiceId>webmuch</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Review Year 2011: Web Development &amp; Webmuch</title>
		<link>http://feedproxy.google.com/~r/webmuch/~3/sgyjtouwCYM/</link>
		<comments>http://webmuch.com/review-year-2011-web-development-webmuch/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 12:20:53 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Symfony2]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=365</guid>
		<description><![CDATA[2011 has been an insane year for web developers. Newer ideas and technologies have come to life everyday. I love web development, I live for it. I love waking up to feedly in anticipation of what the web has for me to learn today. This year has been such a information overload, new things coming [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/9frTNPbZJKQpDFAbkPLPHt0udWo/0/da"><img src="http://feedads.g.doubleclick.net/~a/9frTNPbZJKQpDFAbkPLPHt0udWo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/9frTNPbZJKQpDFAbkPLPHt0udWo/1/da"><img src="http://feedads.g.doubleclick.net/~a/9frTNPbZJKQpDFAbkPLPHt0udWo/1/di" border="0" ismap="true"></img></a></p><p>2011 has been an insane year for web developers. Newer ideas and technologies have come to life everyday. I love web development, I live for it. I love waking up to feedly in anticipation of what the web has for me to learn today. This year has been such a information overload, new things coming out everyday. I realized soon enough, It is quite impossible to keep up with everything. Not that I&#8217;m complaining. But I decided I will learn newer technologies as and when I need them.</p>
<p>One thing I have discovered is that it is not always about knowing &#8220;how it is done?&#8221;, sometimes and most times in advanced web development cases: it is about &#8220;what this can be done with&#8221; (I guess that&#8217;s why consultants flourish so much).</p>
<p>This year I have researched way more than I have learnt. I know what most technologies are about. I know what framework, library, plugin can do what. How? I have no idea until I need it.</p>
<p>This year has been good to me, I have started my own web consulting and development firm named Webmuch Software, I have finished some good projects. The only thing I have failed at is blogging regularly. Here&#8217;s to hoping 2012 will change that for the good.</p>
<p>Below are a few things I think notable about web development industry in 2011.</p>
<p><strong>Web Innovation: Unstoppable</strong></p>
<p>2011 has definitely taught me one thing, the Web won&#8217;t slow down at innovating. The slur of libraries that came out in 2011 is huge. A JavaScript library for everything. Mobile frameworks coming out on a roll one after another. Then their were boilerplate frameworks bringing all that together. PHP 5.3 frameworks and what not.</p>
<ul>
<li>Facebook gave the PHP community a boost with HipHop for PHP in early 2010 by open sourcing the technology. This year they further improved on that by making the <a title="HipHop Virtual Machine" href="https://www.facebook.com/note.php?note_id=10150415177928920&amp;hn=2" target="_blank">HipHop Virtual Machine (HHVM)</a>.</li>
<li>More and more cloud platforms (PaaS) are coming into market everyday. EngineYard, PHPFog, Orchestra, etc. Exciting times ahead.</li>
</ul>
<p><strong>Javascript is the boss:</strong></p>
<p>In 2011 I saw JavaScript flourish in a way I have never seen before (but to be honest, I wasn&#8217;t watching before). Developers are open sourcing libraries of anything and everything. JavaScript MVC Frameworks also took the their position in the limelight. I could be very wrong in thinking that all thiss happened this year. But this post is about what <strong>&#8220;I&#8221; </strong>learnt this year.</p>
<p>Node.js really intrigues me. I haven&#8217;t yet got a chance to play with it enough but the thought of having the same language for server and client side excites me. Also tells me that I should really master JavaScript. Ignorable no more!</p>
<p><strong>Don&#8217;t Mess With The Internet (SAY NO TO SOPA)</strong></p>
<p>Although late in the year. The proposal of SOPA has led to a internet revolution against SOPA supporters. SOPA (Stop Online Piracy Act) basically gives legal rights to ISPs to block websites if copyright infringing content is found published on it.</p>
<p>Instead of accepting it like powerless peasants. We, the internet really stood up to it. <a title="American Censorship" href="http://americancensorship.org/" target="_blank">(BTW: Embedding widgets for saying no to SOPA also exists for your site)</a>. The power of the internet can mainly be seen by following what happened with GoDaddy. Such a PR Disaster.</p>
<p>They were one of the companies that openly supported SOPA and lost more than 70000 domains in less than a week. That showed me the power we possess as free thinking unfiltered internet users.</p>
<p>Always. SAY NO TO SOPA and I will leave GoDaddy as soon as I finish researching other services.</p>
<p><strong>Web technologies I learn&#8217;t in 2011</strong></p>
<p>2011 added <strong><a title="Symfony" href="http://symfony.com" target="_blank">Symfony2</a></strong> to my arsenal of web technologies. I love it and having a routing system in YML is so nice to look at. Beautiful! Along with Symfony2 I learnt <strong><a title="Joomla" href="http://joomla.org" target="_blank">theming Joomla</a></strong>, no biggie I know, but I never got a chance to get to know Joomla up close. Completing a project in it gave the new skill I can flaunt. Also made a <strong>custom WordPress Framework</strong> we use at Webmuch for making WordPress sites for our clients.</p>
<p>2011 in all has been a great learning experience. With that I say goodbye to 2011 and welcome 2012 with open arms to more learning, much web @ Webmuch.</p>
<div style='clear:both'></div><img src="http://feeds.feedburner.com/~r/webmuch/~4/sgyjtouwCYM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/review-year-2011-web-development-webmuch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://webmuch.com/review-year-2011-web-development-webmuch/</feedburner:origLink></item>
		<item>
		<title>Top 5 Joomla! Pitfalls To Avoid (Tips &amp; Tricks)</title>
		<link>http://feedproxy.google.com/~r/webmuch/~3/cT4oK8yQKnc/</link>
		<comments>http://webmuch.com/top-5-joomla-pitfalls-to-avoid/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 12:15:33 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://localhost:8888/webmuch/?p=292</guid>
		<description><![CDATA[
When I landed my 1st major project for Webmuch I had no idea how I was gonna complete it. All I knew was that it had a lot to do with managing and searching users. I, in the haze of getting the project in hand just blurted out: “This can be done in Joomla!”. At [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/puGPmtb-owW6eQtTyrYHVUsvwwc/0/da"><img src="http://feedads.g.doubleclick.net/~a/puGPmtb-owW6eQtTyrYHVUsvwwc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/puGPmtb-owW6eQtTyrYHVUsvwwc/1/da"><img src="http://feedads.g.doubleclick.net/~a/puGPmtb-owW6eQtTyrYHVUsvwwc/1/di" border="0" ismap="true"></img></a></p><p><img class="aligncenter" title="Joomla" src="http://webmuch.com/wp-content/uploads/2011/12/joomla.jpg" alt="Joomla" width="600" height="250" /></p>
<p>When I landed my 1st major project for <a title="Services" href="http://webmuch.com/services/" target="_blank">Webmuch</a> I had no idea how I was gonna complete it. All I knew was that it had a lot to do with managing and searching users. I, in the haze of getting the project in hand just blurted out: “This can be done in <a title="Joomla Homepage" href="http://www.joomla.org/" target="_blank">Joomla!</a>”. At that point I had no idea how to make Joomla! work, how to theme it, what extensions would I need.</p>
<p>Even though I had committed to make the site with Joomla!  I ended up spending a lot of time deciding which CMS could be the best for the job. Of course there were only 3 I was hanging between: WordPress, Joomla! and Drupal. My concern was which one of these is most extendable. I ended up using Joomla! because it seemed easier than jumping into Drupal and more complex than the simplicity of WordPress.</p>
<p>In the long run of things somehow Joomla! along with the <a title="Community Builder" href="http://www.joomlapolis.com/community-builder" target="_blank">Community Builder</a> extension just worked out for me. In the process though, I made a lot of mistakes. With this article I hope I can save you a few pitfalls. According to me these are the top 5 joomla pitfalls to avoid:</p>
<h3>1. Read Read Read</h3>
<p>Coming from a WordPress background, when I started working with Joomla I figured “how hard could this be”. As it turns out pretty hard if you don&#8217;t read the <a title="Joomla! Documentation" href="http://docs.joomla.org/" target="_blank">docs</a> at all. I managed to install Joomla very easily. After all I am a PHP developer. At this point I had no idea what the difference between module, component and plug-in was. I wasted 5 days with trial and error methods failing to do most of what I wanted, after which I decided: I should really read the docs.</p>
<h3>2. Template Overrides</h3>
<p>After theming for WordPress for years it was very different to figure out a new method of theming. Joomla! does not have different files for different blocks of the site. In fact the Joomla! theme has only 1 layout file: index.php.</p>
<p>I knew that it couldn&#8217;t all just been in one file. After reading up a lot I finally figured out how to use <a title="Joomla Template Override" href="http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core" target="_blank">template overrides</a>. This was a completely new concept for me. When I 1st figured it out I said “that&#8217;s so clever”. It is.</p>
<p>What you do is: Find the template of whatever module, component or plugin you wanna theme and copy that folder into HTML folder of your theme wrapped within a folder with the same name as the module, component or plugin. Whatever changes you do to this template to reflect on the website without making any changes to the original file.</p>
<h3>3. Modules, Components and Plug-ins</h3>
<p>Before starting your work make sure you understand the main differences between modules, components and plug-ins.</p>
<p>Component: Official Joomla! docs explain components  as mini applications that can create and delete content of different types.</p>
<p>Modules: Module are the extension type that can show data in different forms. They mainly work with page rendering.</p>
<p>Plugin:  Plug-ins are event based extensions. They perform certain task when a  certain event occurs. It is basically used for triggered programming.</p>
<h3>4. Menu System</h3>
<p>In Joomla! the menu system can be extremely confusing.</p>
<ul>
<li>A menu is made using the menus component, but is displayed using the module position on the template. Simple enough!</li>
</ul>
<pre class="brush: php; title: ; notranslate">
&lt;?php if ($this-&gt;countModules( 'mainMenu' )) : ?&gt;
    &lt;jdoc:include type=&quot;modules&quot; name=&quot;mainMenu&quot; /&gt;
&lt;?php endif; ?&gt;
</pre>
<ul>
<li>Apart from this the most dynamic block of your site where all the blog posts are displayed, or a single article is displayed is also a menu. Yeah I know, it is confusing. Whichever menu you set as default will be displayed on the main block of the template.</li>
</ul>
<h5>Main block of the template:</h5>
<pre class="brush: xml; title: ; notranslate">&lt;jdoc:include type=&quot;component&quot; /&gt;</pre>
<h3>5. Content Creation Kits</h3>
<p>I didn&#8217;t need multiple types of content for my project. That said, it would&#8217;ve been nice to know about <a title="K2 Content Extension" href="http://getk2.org/" target="_blank">K2 Content Extension</a>. Maybe I would&#8217;ve done a few things differently. Joomla&#8217;s default content creation is a simple one. K2 helps make it more complete with different types of content. Image galleries, Media, etc. Not a requirement for every Joomla site, but a great option to know about none the less.</p>
<h3>Bonus Tip</h3>
<p><strong><a title="Akeeba Backup" href="https://www.akeebabackup.com/" target="_blank">Akeeba backup</a> is your friend.</strong> <em>Nuff Said!</em></p>
<p>I hope this article has been a helpful read. Share your own tips in comments below.</p>
<p>Thanks for reading.</p>
<div style='clear:both'></div><img src="http://feeds.feedburner.com/~r/webmuch/~4/cT4oK8yQKnc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/top-5-joomla-pitfalls-to-avoid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://webmuch.com/top-5-joomla-pitfalls-to-avoid/</feedburner:origLink></item>
		<item>
		<title>Top 10 Must Follow Web Blogs + 6 Web News Repositories</title>
		<link>http://feedproxy.google.com/~r/webmuch/~3/PxHsqjX3H_Y/</link>
		<comments>http://webmuch.com/top-10-must-follow-web-blogs-6-web-news-repositories/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 23:03:23 +0000</pubDate>
		<dc:creator>Webmuch Archive</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=198</guid>
		<description><![CDATA[<img class="alignnone size-full wp-image-199" title="Must Follow Blogs Image" src="http://webmuch.com/wp-content/uploads/2009/07/intro.png" alt="Must Follow Blogs Image" width="150" height="150" />A list of Top 10 Web Design &#038; Development Blogs I follow on a daily basis. Plus 6 top community news websites where most web bloggers publish their article links.]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/YDCF_-G4g9YvhTjq3BbfFFzVB2s/0/da"><img src="http://feedads.g.doubleclick.net/~a/YDCF_-G4g9YvhTjq3BbfFFzVB2s/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/YDCF_-G4g9YvhTjq3BbfFFzVB2s/1/da"><img src="http://feedads.g.doubleclick.net/~a/YDCF_-G4g9YvhTjq3BbfFFzVB2s/1/di" border="0" ismap="true"></img></a></p><p>Well I thought it was about time I published my comeback article. Exams are over and a percentage of performance down-fall of WebMuch is something I don’t want Google Analytics to show me anymore. So I thought why not do WebMuch’s first round-up article, with a list of top 10 Web Design &amp; Development Blogs that I follow on a daily basis, plus 6 top web community news websites where most web bloggers publish their article links. I guess this will be enough for your daily appetite for web knowledge &amp; inspiration. Go Gobble.</p>
<h2>Web Design &amp; Development Blogs</h2>
<h3>1. <a href="http://net.tutsplus.com/">Nettuts</a></h3>
<p><a href="http://net.tutsplus.com/"><img class="alignnone size-full wp-image-302" title="nettuts" src="http://webmuch.com/wp-content/uploads/2009/07/nettuts.png" alt="" width="600" height="380" /></a></p>
<p>2. <a href="http://www.smashingmagazine.com/">Smashing Magazine</a><br />
<a href="http://www.smashingmagazine.com/"><img class="alignnone size-full wp-image-302" title="smashingmag" src="http://webmuch.com/wp-content/uploads/2009/07/smashingmag.png" alt="" width="600" height="380" /></a></p>
<h3>3. <a href="http://www.instantshift.com/">Instant Shift</a></h3>
<p><a href="http://www.instantshift.com/"><img class="alignnone size-full wp-image-302" title="instant" src="http://webmuch.com/wp-content/uploads/2009/07/instant.png" alt="" width="600" height="380" /></a></p>
<h3>4. <a href="http://css-tricks.com/">CSS-Tricks</a></h3>
<p><a href="http://css-tricks.com/"><img class="alignnone size-full wp-image-302" title="csstricks" src="http://webmuch.com/wp-content/uploads/2009/07/csstricks.png" alt="" width="600" height="380" /></a></p>
<h3>5. <a href="http://www.noupe.com/">Noupe</a></h3>
<p><a href="http://www.noupe.com/"><img class="alignnone size-full wp-image-302" title="noupe" src="http://webmuch.com/wp-content/uploads/2009/07/noupe.png" alt="" width="600" height="380" /></a></p>
<h3>6. <a href="http://www.smashingapps.com/">Smashing Apps</a></h3>
<p><a href="http://www.smashingapps.com/"><img class="alignnone size-full wp-image-302" title="smashingapps" src="http://webmuch.com/wp-content/uploads/2009/07/smashingapps.png" alt="" width="600" height="380" /></a></p>
<h3>7. <a href="http://davidwalsh.name/">David Walsh Blog</a></h3>
<p><a href="http://davidwalsh.name/"><img class="alignnone size-full wp-image-302" title="davidwalsh" src="http://webmuch.com/wp-content/uploads/2009/07/davidwalsh.png" alt="" width="600" height="380" /></a></p>
<h3>8. <a href="http://speckyboy.com/">Speckyboy</a></h3>
<p><a href="http://speckyboy.com/"><img class="alignnone size-full wp-image-302" title="speckyboy" src="http://webmuch.com/wp-content/uploads/2009/07/speckyboy.png" alt="" width="600" height="380" /></a></p>
<h3>9. <a href="http://sixrevisions.com/">Six Revisions</a></h3>
<p><a href="http://sixrevisions.com/"><img class="alignnone size-full wp-image-302" title="sixrev" src="http://webmuch.com/wp-content/uploads/2009/07/sixrev.png" alt="" width="600" height="380" /></a></p>
<h3>10. <a href="http://www.webdesignerdepot.com/">Web Designer Depot</a></h3>
<p><a href="http://www.webdesignerdepot.com/"><img class="alignnone size-full wp-image-302" title="webdesdepot" src="http://webmuch.com/wp-content/uploads/2009/07/webdesdepot.png" alt="" width="600" height="380" /></a></p>
<h2>Web News Repositories</h2>
<ol>
<li><a href="http://cssglobe.com/news.asp">CSS Globe Community News</a></li>
<li><a href="http://scriptandstyle.com/">Script &amp; Style</a></li>
<li><a href="http://www.webdesign-ne.ws/">Webdesign-Ne.ws</a></li>
<li><a href="http://devmarks.com/">Devmarks</a></li>
<li><a href="http://design-newz.com/">Design-Newz</a></li>
<li><a href="http://designbump.com/">Design Bump</a></li>
</ol>
<p>For a little self promotion: there&#8217;s always <a title="Webmuch Home" href="http://webmuch.com">Webmuch</a> you visit.</p>
<div style='clear:both'></div><img src="http://feeds.feedburner.com/~r/webmuch/~4/PxHsqjX3H_Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/top-10-must-follow-web-blogs-6-web-news-repositories/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://webmuch.com/top-10-must-follow-web-blogs-6-web-news-repositories/</feedburner:origLink></item>
		<item>
		<title>Image Flip Using jQuery</title>
		<link>http://feedproxy.google.com/~r/webmuch/~3/HV64x7xDOPg/</link>
		<comments>http://webmuch.com/image-flip-using-jquery/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 00:11:42 +0000</pubDate>
		<dc:creator>Webmuch Archive</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=175</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/06/intro.jpg" alt="Image Flip Using jQuery Introduction Image" title="Image Flip Using jQuery Introduction Image" width="150" height="150" class="alignnone size-full wp-image-189" />In this week's post we will be creating an illusion effect of an image flip using jQuery of course. This thing can be used as a cool gallery kind of a thing. So, hopefully you guys will like it, let's get to it.]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/vZd051fywOxvJ2PPMBxm39ChbzY/0/da"><img src="http://feedads.g.doubleclick.net/~a/vZd051fywOxvJ2PPMBxm39ChbzY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/vZd051fywOxvJ2PPMBxm39ChbzY/1/da"><img src="http://feedads.g.doubleclick.net/~a/vZd051fywOxvJ2PPMBxm39ChbzY/1/di" border="0" ismap="true"></img></a></p><p>Alright, first of all this is not a real image flip but sort of an illusion, the image does not flip itself in 3D since jQuery does not provide us with an image rotation or a distort feature for HTML elements. I know their are some image rotation plug-ins out their but they don&#8217;t work out very well with animate method of jQuery.</p>
<p><a href="http://webmuch.com/demos/jquery_image_flip/flip.html" title="Demo 1" target="_blank" class="button">View Demo 1</a> <a href="http://webmuch.com/demos/jquery_image_flip/vertical_flip.html" title="Demo 2" target="_blank" class="button">View Demo 2</a> <a href="http://webmuch.com/source/image_flip.zip" title="Source" target="_blank" class="button">Download Source Code</a></p>
<h3>Preview:</h3>
<p><img class="alignnone size-full wp-image-305" title="imageflip" src="http://webmuch.com/wp-content/uploads/2009/06/imageflip.jpg" alt="" width="600" height="424" /></p>
<h3><strong>Note: Image flip with reflection is for demo purposes only, it&#8217;s done using the PHP GD Library and it&#8217;s source files are also included in the source code, so meddle with them if you like.</strong></h3>
<h3>HTML Code:</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;container&quot;&gt;
&lt;h1&gt;Image Flip Illusion Using jQuery&lt;/h1&gt;
 &lt;img id=&quot;image1&quot; src=&quot;images/image1.jpg&quot; alt=&quot;&quot; /&gt;
 &lt;img id=&quot;image2&quot; src=&quot;images/image2.jpg&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;
&lt;pre&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js&quot;&gt;&lt;/script&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;hflip.js&quot;&gt;&lt;/script&gt;
</pre>
<h3>CSS Code:</h3>
<pre class="brush: css; title: ; notranslate">
body{
	background-color:#000;
}
h1{
	color:#FFFFFF;
	font-family:Arial;
	font-size:24px;
	font-weight:bold;
}
#container{
	width:400px;
	margin:0px auto;
	height:380px;
	margin-top:50px}
#image1{
	position:absolute;
	cursor:pointer;
	width:300px;
	height:190px;
}
#image2{
	display:none;
	position:absolute;
	cursor:pointer;
}
</pre>
<p>As you can see in the above code, I&#8217;ve placed the two images in a division and given them absolute positioning to assign their positions in the division.</p>
<p>To achieve the Horizontal flip we are basically reducing the width of the first image to 0 pixels, increasing the left side margin from zero to half it&#8217;s width and as soon as we finish that, Increase the width of the second image from zero to it&#8217;s actual width and do the opposite for left side margin what we did for the first image i.e reduce it from half the width of the image to zero.</p>
<p>This process takes place when you click on the first image (#image1) and the same process also takes place when you click on second image (#image2) except for the obvious shuffle in their ids.</p>
<p>Just look at the jQuery code below and you will have a better idea of what&#8217;s happening:</p>
<h3>jQuery:</h3>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function(){
var margin =$(&quot;#image1&quot;).width()/2;
var width=$(&quot;#image1&quot;).width();
var height=$(&quot;#image1&quot;).height();

$(&quot;#image2&quot;).stop().css({width:'0px',height:''+height+'px',marginLeft:''+margin+'px',opacity:'0.5'});
$(&quot;#reflection2&quot;).stop().css({width:'0px',height:''+height+'px',marginLeft:''+margin+'px'});

	$(&quot;#image1&quot;).click(function(){
		$(this).stop().animate({width:'0px',height:''+height+'px',marginLeft:''+margin+'px',opacity:'0.5'},{duration:500});
		window.setTimeout(function() {
		$(&quot;#image2&quot;).stop().animate({width:''+width+'px',height:''+height+'px',marginLeft:'0px',opacity:'1'},{duration:500});
		},500);
	});

	$(&quot;#image2&quot;).click(function(){
		$(this).stop().animate({width:'0px',height:''+height+'px',marginLeft:''+margin+'px',opacity:'0.5'},{duration:500});
		window.setTimeout(function() {
		$(&quot;#image1&quot;).stop().animate({width:''+width+'px',height:''+height+'px',marginLeft:'0px',opacity:'1'},{duration:500});
		},500);
	});

});
</pre>
<p><strong>If you want to perform a Vertical flip the jQuery code for that too is included in the source code.</strong></p>
<p>Feel free to leave comments if you appreciate the tutorial or if you have any queries. You can also criticize the work but don&#8217;t be rude.</p>
<p>Thanks for Reading!</p>
<div style='clear:both'></div><img src="http://feeds.feedburner.com/~r/webmuch/~4/HV64x7xDOPg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/image-flip-using-jquery/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		<feedburner:origLink>http://webmuch.com/image-flip-using-jquery/</feedburner:origLink></item>
		<item>
		<title>Animated Navigation Bar Using jQuery</title>
		<link>http://feedproxy.google.com/~r/webmuch/~3/1CHFRSjc7io/</link>
		<comments>http://webmuch.com/animated-navigation-bar-using-jquery/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 05:37:58 +0000</pubDate>
		<dc:creator>Webmuch Archive</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=150</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/06/intro.png" alt="Animated Navigation Bar Using jQuery Introduction Image" title="Animated Navigation Bar Using jQuery Introduction Image" width="150" height="150" class="alignnone size-full wp-image-161" />For my first Article I will be writing on creating an Animated Navigation Bar Using jQuery. Hopefully you guys will like it.]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/tY5qHt-dIBryXddV1HcLHr7v-Wk/0/da"><img src="http://feedads.g.doubleclick.net/~a/tY5qHt-dIBryXddV1HcLHr7v-Wk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/tY5qHt-dIBryXddV1HcLHr7v-Wk/1/da"><img src="http://feedads.g.doubleclick.net/~a/tY5qHt-dIBryXddV1HcLHr7v-Wk/1/di" border="0" ismap="true"></img></a></p><p><img class="alignnone size-full wp-image-308" title="animnav" src="http://webmuch.com/wp-content/uploads/2009/06/animnav.jpg" alt="" width="634" height="300" /></p>
<p><a href="http://webmuch.com/demos/jquery_animated_navbar/navbar.html" title="Demo" target="_blank" class="button">View Demo</a> <a href="http://webmuch.com/source/jquery_animated_navbar.zip" title="Source" target="_blank" class="button">Download Source Code</a></p>
<p>In this tutorial we will be making a navigation bar with animated background. To create this effect we will be using HTML, CSS and  jQuery. I am assuming that the readers are well versed with CSS &amp; HTML and have the basic understanding of jQuery.</p>
<p>Let&#8217;s jump right into it then:</p>
<h3>HTML Code:</h3>
<pre class="brush: xml; title: ; notranslate">&lt;/pre&gt;
&lt;div class=&quot;container&quot;&gt;
&lt;div id=&quot;navbar1&quot;&gt;
&lt;ul id=&quot;sprite&quot;&gt;
	&lt;li id=&quot;b0&quot; class=&quot;a0&quot;&gt;Home&lt;/li&gt;
	&lt;li id=&quot;b1&quot;&gt;News&lt;/li&gt;
	&lt;li id=&quot;b2&quot;&gt;Blog&lt;/li&gt;
	&lt;li id=&quot;b3&quot;&gt;Pictures&lt;/li&gt;
	&lt;li id=&quot;b4&quot;&gt;Videos&lt;/li&gt;
	&lt;li id=&quot;b5&quot;&gt;Gallery&lt;/li&gt;
	&lt;li id=&quot;b6&quot;&gt;About&lt;/li&gt;
	&lt;li id=&quot;b7&quot; style=&quot;border-right: 1px solid #1f1f1f;&quot;&gt;Contact&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre&gt;
</pre>
<h3>CSS Code:</h3>
<pre class="brush: css; title: ; notranslate">
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, code,
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	font-family: inherit;
	vertical-align: baseline;
}
body{
background-color:#1f1f1f;
}
.container{
	width:960px;
	margin:0px auto;
	color:#FFFFFF;
	font-family:Arial,sans-serif;
	font-size:20px;
	font-weight:bold;
}
#navbar1{
	float:left;
	width:960px;
	height:36px;
	font-size:14px;
	margin:20px 0 0 0;
	background:url(images/navbar_bg.png);
}
#navbar1 ul{
	float:left;
	width:585px;
	height:36px;
	margin-left:188px;
	color:#000000;
}
#navbar1 ul{
	background: url(images/anim_3.png) no-repeat;
	background-position:1px 4px;
}
#navbar1 ul li{
	float:left;
	width:72px;
	margin:3px 0 0 0;
	height:22px;
	display: inline;
	text-align:center;
	padding:7px 0 0 0;
	border-left:1px solid #1f1f1f;
	cursor:pointer;
}
</pre>
<p>This technique is only effective when using a predefined width for each button or list item as shown in the above image, this can also be implemented on navigation bars using dynamic widths, but you might have to change the jQuery and the image sprite quite a bit to achieve any kind of consistency in your design. Well to give you a basic explanation as to how we will animate the navigation bar from here on in, we will take a background image equal to the size of the list item, which, on mouse-over positions itself to the left of each respective list item. So, as you can see in my HTML code I have named(id) my unordered list as &#8216;sprite&#8217; with a backround image. I have also named(id) my list items b0,b1,b2,b3&#8230;.b7, depending on the number of list items you wish to have in your navigation bar. I&#8217;ll explain why we are doing this in a bit, after you read through the jQuery code.</p>
<h3>jQuery Code:</h3>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function(){
	var selected=0; // Default background position
	var position=0;

	$(&quot;#sprite&quot;).css({backgroundPosition:''+selected+'px 4px'});

	$(&quot;#b0,#b1,#b2,#b3,#b4,#b5,#b6,#b7&quot;).css({backgroundPosition:'0px 0px'}).mouseover(function(){
	position=$(this).attr(&quot;id&quot;).slice(1,2)*($(this).outerWidth());
	/*width of your list item*/
	$(&quot;#sprite&quot;).stop().animate({backgroundPosition:''+position+'px 4px'},{duration:200});
	});

	$(&quot;#b0,#b1,#b2,#b3,#b4,#b5,#b6,#b7&quot;).css({backgroundPosition:'0px 0px'}).mouseout(function(){
	$(&quot;#sprite&quot;).stop().animate({backgroundPosition:''+selected+'px 4px'},{duration:200});
	});
});
</pre>
<h3>Step By Step Read Through:</h3>
<ul>
<li>In the first line, we define the default background position of the background image of #sprite (even though, we&#8217;ve already mentioned the default background position in the CSS file, we still have to declare the default background position in jQuery, because for some reason, Internet Explorer shows an error after repeated mouse-over states).</li>
<li>Now, on mouse-over of any of the list items, we simply calculate the background position of the image in the background of #sprite and using the animate method of jQuery we move it to its destined location. For example: On mouse-over of b0, in my case I moved it 0 * 73(width of my button) i.e. 0 pixels from the left of #sprite. On mouse-over of b1, I moved it 1 * 73 i.e. 73 pixels from the left of #sprite. On mouse-over of b2, I moved it 2 * 73 i.e. 146 pixels from the left of #sprite, so on and so forth. That is the very reason I named (id) my list items b0, b1, b2…, so that I can slice out the numerical values from it using slice(1,2).</li>
<li>Using the sliced numerical values we calculate the position of the background image, finally animate it and avoid a list of if else statements for each list item.</li>
<li>On mouse-out of any of the list items the background image comes back to its original position i.e. 0px (var selected;) from the left and 4px from the top.</li>
<li>Now, if you got any of the stuff I&#8217;ve explained there is one question popping in your head that do I have to manually give value to the variable &#8220;selected&#8221; for every page , well to avoid this you just have to edit the jQuery from the top to the one below.</li>
</ul>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function(){
	var check;
	var i;
	for(i=0;i		if($(&quot;.a&quot;+i+&quot;&quot;).attr(&quot;id&quot;)){
		check=$(&quot;.a&quot;+i+&quot;&quot;).attr(&quot;id&quot;).slice(1,2);
		}
	}

	var selected=check*($(&quot;#b0&quot;).outerWidth());
	var position;

	$(&quot;#sprite&quot;).css({backgroundPosition:''+selected+'px 4px'});

	$(&quot;#b0,#b1,#b2,#b3,#b4,#b5,#b6,#b7&quot;).css({backgroundPosition:'0px 0px'}).mouseover(function(){
	position=$(this).attr(&quot;id&quot;).slice(1,2)*($(&quot;#b0&quot;).outerWidth());/*width of your list item*/
	$(&quot;#sprite&quot;).stop().animate({backgroundPosition:''+position+'px 4px'},{duration:300});
	});

	$(&quot;#b0,#b1,#b2,#b3,#b4,#b5,#b6,#b7&quot;).css({backgroundPosition:'0px 0px'}).mouseout(function(){
	$(&quot;#sprite&quot;).stop().animate({backgroundPosition:''+selected+'px 4px'},{duration:300});
	});
});
</pre>
<p>Now we can easily name the class a0 or a1 or a2 or a4 of our list item (active list item) in our HTML to set the default background position of our background in #sprite and the script basically looks for the class with prefix &#8220;a&#8221; then slices out the next element i.e. 0 or 1 or 2 or 3, etc and multiplies it to the width of the element and gives it a default position from the left.</p>
<p>Feel free to leave comments if you appreciate the tutorial or if you have any problems implementing it.</p>
<p>Thanks for reading.</p>
<div style='clear:both'></div><img src="http://feeds.feedburner.com/~r/webmuch/~4/1CHFRSjc7io" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/animated-navigation-bar-using-jquery/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		<feedburner:origLink>http://webmuch.com/animated-navigation-bar-using-jquery/</feedburner:origLink></item>
		<item>
		<title>How &amp; why you should use Google CDN</title>
		<link>http://feedproxy.google.com/~r/webmuch/~3/n3vNlCrOtME/</link>
		<comments>http://webmuch.com/how-why-you-should-use-google-cdn/#comments</comments>
		<pubDate>Sat, 30 May 2009 20:17:37 +0000</pubDate>
		<dc:creator>Webmuch Archive</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=133</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/05/intro2.jpg" alt="jQuery Google CDN Image" title="jQuery Google CDN Image" width="150" height="150" class="alignnone size-full wp-image-136" />In this article I will share the importance of using a Google CDN link of our favorite JavaScript library and how to implement it with two different methods.]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/d6yWFcpBpM_gTdy9vhwKjPELMcs/0/da"><img src="http://feedads.g.doubleclick.net/~a/d6yWFcpBpM_gTdy9vhwKjPELMcs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/d6yWFcpBpM_gTdy9vhwKjPELMcs/1/da"><img src="http://feedads.g.doubleclick.net/~a/d6yWFcpBpM_gTdy9vhwKjPELMcs/1/di" border="0" ismap="true"></img></a></p><h3>What is Google’s CDN?</h3>
<p>Google CDN stands for Google Content Distribution Network. It provides a loading architecture for the most popular, open source JavaScript libraries.</p>
<p><img class="alignnone size-full wp-image-311" title="libraries" src="http://webmuch.com/wp-content/uploads/2009/05/libraries.jpg" alt="" width="600" height="250" /></p>
<h3>Why should I use Google’s CDN links?</h3>
<p>Most of the websites I see, still host their JavaScript Library on their own server (Most, not all). Actually never have I ever seen any Web Development Blog hosting the library on their own server. They always use Google CDN, which is great because it has a number of advantages:</p>
<ol>
<li>Google’s Content Distribution Network has libraries on their various servers across the world and if you use their CDN link, when a user’s browser resolves the URL, their browser will automatically download the file from the closest available server, which will be a much faster download than if you force a user to download the file from your host server in whichever country your website is hosted.</li>
<li>Google’s Content Distribution Network will save you a great deal of bandwidth if you have large traffic on your website and a limited bandwidth with your host.</li>
<li>There is a good chance that the Google hosted version of that library is already cached on the user’s browser cache, as lot of big websites and portals use Google’s CDN links including Google itself and Google’s servers instruct browsers to cache the file for one year if there are quite a few requests for the same hosted file.</li>
</ol>
<h3>How to use Google CDN?</h3>
<p>Google’s CDN provides most of the popular, open source JavaScript Libraries with two ways of using each of them via the direct path in the &lt;script/&gt; tags and via The Google AJAX Libraries API.</p>
<p>To use the Google AJAX Libraries API we need to include the Google &#8220;jsapi&#8221; script:</p>
<pre class="brush: xml; title: ; notranslate">&lt;script src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&gt;</pre>
<p>The Google AJAX Libraries API provides a simple and powerful google.load() method which accepts two arguments, the first argument to google.load is the name of a library. The second argument is the version of the library:</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script&gt;
google.load(&quot;jquery&quot;, &quot;1.3.2&quot;);
google.load(&quot;jqueryui&quot;, &quot;1.7.1&quot;);
    google.setOnLoadCallback(function(){
        // use this instead of:
        /*
            $(document).ready(function(){  });
        */
    });
&lt;/script&gt;
</pre>
<p>But to use this API, there is a different approach for the ready functions of all the libraries. For example, in the above code, we use google.setOnLoadCallback(function(){ }); instead of jQuery’s ready function. In-fact we use google.setOnLoadCallback(function(){ }); instead of all different library’s ready functions. This can be seen as a drawback or a good feature; I see it as a good feature as it gives me a single ready function for all libraries.</p>
<p>The second method to use Google’s CDN links is by the direct paths of the libraries in the &lt;script/&gt; tags</p>
<p>Below is a list of all the JavaScript Libraries Google CDN provides with the direct paths and google.load implementation:</p>
<h3>jQuery</h3>
<pre class="brush: css; title: ; notranslate">
name: jquery
versions: 1.2.3, 1.2.6, 1.3.0, 1.3.1, 1.3.2
load request: google.load(&quot;jquery&quot;, &quot;1.3.2&quot;);
extras: uncompressed:true, e.g., google.load(&quot;jquery&quot;, &quot;1.3.2&quot;, {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
path(u): http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js
</pre>
<h3>jQuery UI</h3>
<pre class="brush: css; title: ; notranslate">
name: jqueryui
versions: 1.5.2, 1.5.3, 1.6, 1.7.0, 1.7.1
load request: google.load(&quot;jqueryui&quot;, &quot;1.7.1&quot;);
extras: uncompressed:true, e.g., google.load(&quot;jqueryui&quot;, &quot;1.7.1&quot;, {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js
path(u): http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.js
note: This library depends on jquery. Before loading this module, you must load jquery. e.g.:
        google.load(&quot;jquery&quot;, &quot;1.3.2&quot;);
        google.load(&quot;jqueryui&quot;, &quot;1.7.1&quot;);
</pre>
<h3>Prototype</h3>
<pre class="brush: css; title: ; notranslate">
name: prototype
versions: 1.6.0.2, 1.6.0.3
load request: google.load(&quot;prototype&quot;, &quot;1.6.0.3&quot;);
path: http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js
</pre>
<h3>script.aculo.us</h3>
<pre class="brush: css; title: ; notranslate">
name: scriptaculous
versions: 1.8.1, 1.8.2
load request: google.load(&quot;scriptaculous&quot;, &quot;1.8.2&quot;);
path: http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/scriptaculous.js
note: This library depends on Prototype. Before loading this module, you must load Prototype. e.g.:
        google.load(&quot;prototype&quot;, &quot;1.6&quot;);
        google.load(&quot;scriptaculous&quot;, &quot;1.8.2&quot;);
</pre>
<h3>MooTools</h3>
<pre class="brush: css; title: ; notranslate">
name: mootools
versions: 1.11, 1.2.1, 1.2.2
load request: google.load(&quot;mootools&quot;, &quot;1.2.2&quot;);
extras: uncompressed:true, e.g., google.load(&quot;mootools&quot;, &quot;1.2.2&quot;, {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools-yui-compressed.js
path(u): http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools.js&lt;
</pre>
<h3>Dojo</h3>
<pre class="brush: css; title: ; notranslate">
name: dojo
versions: 1.1.1, 1.2.0, 1.2.3, 1.3.0, 1.3.1
load request: google.load(&quot;dojo&quot;, &quot;1.3.1&quot;);
extras: uncompressed:true, e.g., google.load(&quot;dojo&quot;, &quot;1.3.1&quot;, {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/dojo/1.3.1/dojo/dojo.xd.js
path(u): http://ajax.googleapis.com/ajax/libs/dojo/1.3.1/dojo/dojo.xd.js.uncompressed.js
</pre>
<h3>SWFObject</h3>
<pre class="brush: css; title: ; notranslate">
name: swfobject
versions: 2.1
load request: google.load(&quot;swfobject&quot;, &quot;2.1&quot;);
extras: uncompressed:true, e.g., google.load(&quot;swfobject&quot;, &quot;2.1&quot;, {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js
path(u): http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject_src.js
</pre>
<h3>Yahoo! User Interface Library (YUI)</h3>
<pre class="brush: css; title: ; notranslate">
name: yui
versions: 2.6.0, 2.7.0
load request: load request: google.load(&quot;yui&quot;, &quot;2.7.0&quot;);
extras: uncompressed:true, e.g., google.load(&quot;yui&quot;, &quot;2.7.0&quot;, {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/yui/2.7.0/build/yuiloader/yuiloader-min.js
path(u): http://ajax.googleapis.com/ajax/libs/yui/2.7.0/build/yuiloader/yuiloader.js
</pre>
<p>Source: <a href="http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries">Google</a></p>
<p>Thanks for reading.</p>
<div style='clear:both'></div><img src="http://feeds.feedburner.com/~r/webmuch/~4/n3vNlCrOtME" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/how-why-you-should-use-google-cdn/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://webmuch.com/how-why-you-should-use-google-cdn/</feedburner:origLink></item>
		<item>
		<title>Simple jQuery Slideshow with PHP Image Stripe</title>
		<link>http://feedproxy.google.com/~r/webmuch/~3/e4ekmPDqzYU/</link>
		<comments>http://webmuch.com/simple-jquery-slideshow-with-php-image-stripe/#comments</comments>
		<pubDate>Wed, 27 May 2009 02:16:40 +0000</pubDate>
		<dc:creator>Webmuch Archive</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=97</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/05/intro.jpg" alt="Simple jQuery Slideshow with PHP Image Stripe Image" title="Simple jQuery Slideshow with PHP Image Stripe Image" width="150" height="150" class="alignnone size-full wp-image-102" />In this tutorial we will be making a simple jQuery Slideshow with the output image stripe from the last tutorial on <a href="http://webmuch.com/image-stripe-using-php-gd-library/">PHP GD Library Image Stripe</a>, Thereby making use of it in a real world application.]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/zLfzd9TJylfz9I_mVDk-NRv_t6w/0/da"><img src="http://feedads.g.doubleclick.net/~a/zLfzd9TJylfz9I_mVDk-NRv_t6w/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/zLfzd9TJylfz9I_mVDk-NRv_t6w/1/da"><img src="http://feedads.g.doubleclick.net/~a/zLfzd9TJylfz9I_mVDk-NRv_t6w/1/di" border="0" ismap="true"></img></a></p><h3>Preview:</h3>
<p><img class="alignnone size-full wp-image-315" title="imagestripe" src="http://webmuch.com/wp-content/uploads/2009/05/imagestripe.jpg" alt="" width="600" height="250" /></p>
<p><a class="button" title="Demo" href="http://webmuch.com/demos/jquery_imagestripe_slideshow/index.html" target="_blank">View Demo</a> <a class="button" title="Source" href="http://webmuch.com/source/jquery_imagestripe_slideshow.zip" target="_blank">Download Source Code</a></p>
<p>I created the last post on creating an image stripe using PHP GD Library because a friend of mine needed to join some images for his web project and used that technique which I found very interesting, but apart from his use of it, I couldn’t find many real world situations where that technique could be used, but it’s not that I didn’t find any. Therefore this post is dedicated to use that technique in a real world application. So today I will create a slideshow using the output of my last post (Image Stripe using PHP GD Library).</p>
<h3>Index.php:</h3>
<pre class="brush: xml; title: ; notranslate">

PHP &amp; jQuery Slideshow
&lt;!-- stylesheets begin --&gt;

&lt;!-- stylesheets end --&gt;&lt;/pre&gt;
&lt;div id=&quot;wrap&quot;&gt;
&lt;div id=&quot;slideshow&quot;&gt;&lt;a class=&quot;next&quot; href=&quot;#&quot;&gt;
 Next
 &lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre&gt;
&lt;!-- end container --&gt;

&lt;!-- There is no link to the image file in the markup as the link to the image is in the css file as a background-image of the div#slideshow element. --&gt;
</pre>
<h3>Explanation:</h3>
<p>In the above code, the markup is fairly simple to understand. We link to the stylesheets and create a wrapper element (div#wrap) inside which we create a slideshow division which contains an anchor tag, simple enough. Please read the CSS code below for the master stylesheet.</p>
<h3>Master.css:</h3>
<pre class="brush: css; title: ; notranslate">
#wrap{
/* a simple enough wrapper */
	width:958px;
	border:1px solid #3b5998;
	border-top:none;
	margin:0 auto;
	background:#b7c4df;
	padding:20px 0;
	overflow:hidden;
}
#slideshow{
	width:600px;
	/* width is the size of at least two visible images in the merged image */
	height:225px;
	background:#ffffff url('../createImage.php') repeat-x;
	/* We link to the createImage.php file itself as the file itself returns the merged image */
	border:1px solid #000;
	margin:30px auto;
	overflow:hidden;
}
a.next{
	float:left;
	width:300px;
	/* To cover the first image out of the two visible */
	height:225px;
	line-height:225px; /*For vertical middle alignment*/
	text-align:center;
	text-decoration:none;
	background:#ffffff;
	font-family:Garamond, Hoefler Text, Palatino, Palatino Linotype, serif;
	font-size:30px;
	font-weight:bold;

	/* Cross Browser Transparency */
	filter:alpha(opacity=50);
	-moz-opacity:0.5;
	-khtml-opacity: 0.5;
	opacity: 0.5;
	/* Cross Browser Transparency */
}
#slideshow a{ color:#000; }
</pre>
<p>Now, Getting back into the making of the slideshow, let’s analyze a little. According to the last tutorial we joined six images with a width of 300 pixels each and a height of 225 pixels each, here according to the CSS above, we are showing the joined image as a repeating background image of an element having a width of 600 pixels hence, showing two of the six images in our stripe. Then we have an anchor tag over the first image of the six with 50% transparency, so it is translucently visible below the anchor.</p>
<p>Moving on, what we want to do here is that we want to animate the background-image to slide leftwards by 300 pixels each time a user clicks on the anchor (which has a class &#8220;next&#8221; assigned to it) and as the image is repeated on the x-axis there is no end to reach for.</p>
<h3>jQuery code for explanation:</h3>
<p>Place the following JavaScript code right after closing the body tag in the index.php file.</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; language=&quot;JavaScript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js&quot;&gt;&lt;/script&gt;&lt;script type=&quot;text/javascript&quot; language=&quot;JavaScript&quot;&gt;// &lt;![CDATA[
var count = 1;
$(function(){
	$('#slideshow').css({backgroundPosition: '0px 0px'});
	$('a.next').click(function(){
		var x_position = count*-300;
		//console.log(x_position);
		$('#slideshow').animate({backgroundPosition: ''+x_position+'px 0px'});
		count++;
	});
});
// ]]&gt;&lt;/script&gt;
&lt;!-- scripts end --&gt;
</pre>
<p>In the above code, we started a count from 1 as we will need to increase the value of background position with each click. But first we set the background position of the division with the id of “slideshow” to zeros. This is a good thing to do as we live in a world where Internet Explorer still survives. Then when the anchor (a.next) is clicked we initiate a function where we catch the count multiplied by 300 in a variable (x_position) and a minus sign for animating leftwards and then we animate the background-position with that value. Finally we increase the count by 1 for the next click, therefore, the first time we click the value of x_position is -300, the second time we click, it is -600 and so on.</p>
<p><strong>Note: make sure to comment out or remove the console.log statement as it creates problems in all the browsers except Firefox.</strong></p>
<p>Thanks for reading.</p>
<div style='clear:both'></div><img src="http://feeds.feedburner.com/~r/webmuch/~4/e4ekmPDqzYU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/simple-jquery-slideshow-with-php-image-stripe/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://webmuch.com/simple-jquery-slideshow-with-php-image-stripe/</feedburner:origLink></item>
		<item>
		<title>Image Stripe Using PHP GD Library</title>
		<link>http://feedproxy.google.com/~r/webmuch/~3/DgrARkiLsr4/</link>
		<comments>http://webmuch.com/image-stripe-using-php-gd-library/#comments</comments>
		<pubDate>Sat, 09 May 2009 10:01:50 +0000</pubDate>
		<dc:creator>Webmuch Archive</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[GD Library]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=73</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/05/post-intro-image.png" alt="Image Stripe Using PHP GD Library Picture" title="Image Stripe Using PHP GD Library Picture" width="150" height="150" class="alignnone size-full wp-image-74" />In this tutorial we will create an image stripe using PHP's file handling capabilities and GD Library. It will read any number of images from a specified folder and join them all to create a single server side generated image stripe. This will provide the basics of File Handling and GD Graphics Library.]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/oOW_edKd_dH5Q6wTeXo2pCGGLZY/0/da"><img src="http://feedads.g.doubleclick.net/~a/oOW_edKd_dH5Q6wTeXo2pCGGLZY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/oOW_edKd_dH5Q6wTeXo2pCGGLZY/1/da"><img src="http://feedads.g.doubleclick.net/~a/oOW_edKd_dH5Q6wTeXo2pCGGLZY/1/di" border="0" ismap="true"></img></a></p><p>What we are going to do today is quite simple. We will read a specific directory for all available images in it and merge them into a single image. Sounds simple, well it is.</p>
<p><a href="http://webmuch.com/source/php_imagestripe.zip" title="Source" target="_blank" class="button">Download Source Code</a></p>
<h3>What We Need:</h3>
<ul>
<li>Create a project main folder and create two more folders in it, name them: &#8220;css&#8221; and &#8220;slides&#8221; respectively.</li>
<li>In the project main folder create two files, name them: &#8220;index.php&#8221; and &#8220;createImage.php&#8221; respectively.</li>
<li>In the slides folder put in some jpeg images with same width and height. In my case I used 300px width and 225px height.</li>
</ul>
<h3>index.php:</h3>
<pre class="brush: php; title: ; notranslate">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;

&lt;head&gt;
&lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot; /&gt;
&lt;title&gt;PHP GD Library Image Stripe&lt;/title&gt;
&lt;!-- stylesheets begin --&gt;

&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/reset.css&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/master.css&quot; /&gt;

&lt;!-- stylesheets end --&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div id=&quot;wrap&quot;&gt;
	&lt;h2&gt;PHP Image Stripe&lt;/h2&gt;
	&lt;div id=&quot;slideshow&quot;&gt;
		&lt;img src=&quot;createImage.php&quot; title=&quot;Image Stripe&quot; alt=&quot;Image Stripe&quot; /&gt;
	&lt;/div&gt;
&lt;/div&gt;&lt;!-- end wrap --&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>In the above code the only new thing to you should be the source(src attribute) of the image tag, which is the link of our &#8220;createImage.php&#8221; file, this is because the file itself when executed outputs an image file. Hope that makes sense, it sure will after you read the excessively documented code of &#8220;createImage.php&#8221; below.</p>
<h3>createImage.php:</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
$dirPath = 'slides/'; // The path of the directory
$count = 0; // For counting the number of images in the directory

// To check if this is a valid directory
if (is_dir($dirPath)) {
	// Open the directory and make a directory handler called $db
	if ($dh = opendir($dirPath)) {

		// Report all errors except E_WARNING (warnings)
		error_reporting(E_ALL ^ E_WARNING);

		/*
		 *	We have closed the warnings here as there should be no text
		 *	on a page which should be returning as an image otherwise the
		 *	image will not be produced, instead the name of the file will
		 *	be printed.
		 *
		 *	As we are going to use the getimagesize() method to determine
		 *	whether the passed file is an image or not, the method returns
		 *	false when a non image file is passed as a parameter but also
		 *	produces a warning about the same concern, which is why we have
		 *	to disable the warnings in runtime.
		 */

		/*	We start a while loop which runs until the readdir method returns false
		 *	as there are no more files in the directory.
		 *
		 *	each time the loop runs, it enters the next files name in the
		 *	$src variable.
		 */

	while (($filename = readdir($dh)) !== false) {

		/*	getimagesize() method returns false if the file is not an image file.
		 *	Therefore, we check for it to be true as we have passed the file source
		 *	in it, which we created simply by concatinating the $dirPath before
		 *	the $filename.
		 */

		if(getimagesize($dirPath.$filename))
		{

		/*
		 *	We are taking all the &quot;only-image&quot; file names in an array called $imgSrc.
		 *
		 *	$count keeps increasing by 1 if the file is an image and therefore,
		 *	gives us the number of images in the folder. We can get the number
		 *	of images by getting the length of the array as-well and there maybe
		 *	many more methods. But I like it done this way. It is purely a matter
		 *	of choice.
		 */
			$imgSrc[$count] = $dirPath.$filename;
			$count++;
		}
	}

	/*
	 *	As we are creating a horizontal stripe of images we are only
	 *	concerned with the width. First we need to create an Image
	 *	with the dimentions of our final image, therefore we found the
	 *	only the width of our final image because in our case we have
	 *	a static height of our final image.
	 *
	 *	In my case each image in my slides directory has a width of 300px
	 *	and a height of 225px. Therefore, width for a horizontal stripe of
	 *	all images merged will be the number of images multiplied by 300.
	 *
	 *	Which is exactly what I've taken in a variable called $width.
	 *
	 *	Now, for creating an image we have used the imagecreatetruecolor
	 *	method and the resource handler is stored in the variable
	 *	$outputImage.
	 *
	 *	Note: Remember, the height and width of the JPEG's in the slide folder
	 *	must be the same.
	 */

	$width = 300 * $count;
	$outputImage = imagecreatetruecolor($width, 225);

	/*
	 *	We run a loop with the number of images as the limit,
	 *	in which we  create a resource handler for each image
	 *	in the slides folder and then merge it into the Main
	 *	Image i.e. $outputImage.
	 *
	 *	If the loop runs for the first time the &quot;x-coordinate of destination point&quot;
	 *	is static and hard coded as 300 and then for each increament we multiply 300
	 *	by the loop count, this merges the images one after another horizontally
	 *
	 */

		for($i=0; $i&lt;$count; $i++)
		{
			$temp = imagecreatefromjpeg($imgSrc[$i]);
			if($i==0)
				imagecopymerge($outputImage, $temp, 0, 0, 0, 0, 300, 225, 100);
			else
				imagecopymerge($outputImage, $temp, $i*300, 0, 0, 0, 300, 225, 100);

			/*
			 *	Syntax Explaination
			 *
				imagecopymerge(
						Destination image link resource,
						Source image link resource,
						x-coordinate of destination point,
						y-coordinate of destination point,
						x-coordinate of source point,
						y-coordinate of source point,
						Source width,
						Source height,
						alpha transparency
				)
			*/

		}
	}
}

// For displaying the image as the output.

header('Content-type: image/jpeg');
imagejpeg($outputImage);

// Destroying the resourse handler.
imagedestroy($outputImage);

/*
 *	Reporting all errors. Switching it back on,
 *	as the image has already been produced and displayed.
 */
error_reporting(E_ALL);
?&gt;
</pre>
<p><strong>Note: Remember, the height and width of the JPEG&#8217;s in the slides folder must be the same.</strong><br />
<strong>Note: imagecreatetruecolor() method does not support GIF images.</strong></p>
<h3>Links:</h3>
<ul>
<li><a href="http://in.php.net/imagecopymerge">imagecopymerge()</a></li>
<li><a href="http://in.php.net/manual/en/function.error-reporting.php">error_reporting()</a></li>
<li><a href="http://in.php.net/imagecreatefromjpeg">imagecreatefromjpeg()</a></li>
<li><a href="http://in.php.net/imagecreatetruecolor">imagecreatetruecolor()</a></li>
</ul>
<p>Thanks for reading!</p>
<div style='clear:both'></div><img src="http://feeds.feedburner.com/~r/webmuch/~4/DgrARkiLsr4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/image-stripe-using-php-gd-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://webmuch.com/image-stripe-using-php-gd-library/</feedburner:origLink></item>
		<item>
		<title>Lightbox Effect Maintenance Page</title>
		<link>http://feedproxy.google.com/~r/webmuch/~3/VRAICwCu51s/</link>
		<comments>http://webmuch.com/lightbox-effect-maintenance-page/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 20:50:50 +0000</pubDate>
		<dc:creator>Webmuch Archive</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PNG Fix]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=50</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/04/post-intro.png" alt="Lightbox Effect Maintenance Page Photo" title="Lightbox Effect Maintenance Page Photo" width="150" height="150" class="alignnone size-full wp-image-51" />Well the Website Build-Up series was getting a little same-ish so I thought I’d share this cool little technique for telling the user that a page is currently not in use. By the way, this technique would make a great 404 page.]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/afgJ_1Nx30GlLQwqXvQhrifGZms/0/da"><img src="http://feedads.g.doubleclick.net/~a/afgJ_1Nx30GlLQwqXvQhrifGZms/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/afgJ_1Nx30GlLQwqXvQhrifGZms/1/da"><img src="http://feedads.g.doubleclick.net/~a/afgJ_1Nx30GlLQwqXvQhrifGZms/1/di" border="0" ismap="true"></img></a></p><h3>Preview:</h3>
<p><img src="http://webmuch.com/wp-content/uploads/2009/04/overlay.jpg" alt="" title="overlay" width="600" height="250" class="alignnone size-full wp-image-318" /></p>
<p><a href="http://webmuch.com/source/lightbox_effect.zip" target="_blank" class="button">Download Source Code</a></p>
<p>OK! Before starting let me warn you that this technique is totally based on HTML &amp; CSS, so make sure you take care of all this on the server end as-well, which basically means that if the page in the background has a form, then it shouldn’t be active &amp; things like that. So moving on: I have taken an old template I was working on to show the Lightbox overlay effect on it.</p>
<h3>What We Need:</h3>
<ul>
<li>Make a 1px * 1px image in Photoshop and fill a new layer with black and reduce it&#8217;s opacity by 50% then hide the background layer and save the transparent image as a 24bit PNG in the images directory name it overlay.png</li>
<li>Make another image around 400px wide and make something you want to display on a page under maintenance and save it in the images directory name it maintain.png</li>
</ul>
<p>Moving on: Once you have the page to be in the background open it in a text editor of your choice; As the body tag opens, place this code(even before the container).</p>
<pre class="brush: xml; title: ; notranslate">
&lt;img src=&quot;./images/maintain.png&quot; id=&quot;maintain&quot; alt=”Under Maintenance” /&gt;
&lt;div id=&quot;overlay&quot;&gt;&amp;nbsp;&lt;/div&gt;
</pre>
<p>It is the hierarchy we need to understand here. We want to display a dark transparent overlay on the whole page therefore we place the division with an id of overlay on the top and then we want to display a maintenance image on top of it and so we place the img tag with that image even on top of the overlay division.</p>
<p>Now make a new stylesheet in your CSS directory, call it technique.css, include it on the page and then place this code in it. (You can place this code in your master stylesheet as well).</p>
<pre class="brush: css; title: ; notranslate">
#overlay{
width:100%;
height:1100px; /*about the height of the background page*/
background:url('../images/overlay.png') repeat; /*to include &amp; repeat the image on the whole page*/
position:absolute; /*to place it anywhere on the page*/
top:0;/*start from the top*/
left:0;/*and start from the left*/
z-index:90; /*tells the browser that it should be displayed above the items with a “z-index” value less than 90*/
}
#maintain{
position:absolute;
left:50%; /*so the image starts after half of the page from the left */
top:50%; /*so the image starts after half of the page from the top */
margin: -140px 0 0 -200px; /*we bring up the image by half it’s height and bring it left by half it’s width*/
/*now the image should be in the center of the page.*/
z-index:100; /*tells the browser that it should be displayed above the items with a “z-index” value less than 100*/
}
</pre>
<p>IE6:</p>
<p>To make the transparent background image render transparent in IE6, download the <a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/#usage">DD_belatedPNG</a> JavaScript. Place the .js file in the js directory of the page and if the IE browser version is less than 7 then include it in our page right before ending the body tag, then open another script tag and run the fix method, pass in the ID of the overlay division in it. To know more about the DD_belatedPNG read it’s <a href="http://www.dillerdesign.com/experiment/DD_belatedPNG">documentation</a>.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--[if IE 6]&gt;
&lt;script src=&quot;./js/DD_belatedPNG_0.0.7a-min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
  DD_belatedPNG.fix('#overlay');
&lt;/script&gt;
&lt;![endif]--&gt;
</pre>
<p>Thanks for reading!</p>
<div style='clear:both'></div><img src="http://feeds.feedburner.com/~r/webmuch/~4/VRAICwCu51s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/lightbox-effect-maintenance-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://webmuch.com/lightbox-effect-maintenance-page/</feedburner:origLink></item>
	</channel>
</rss>

