<?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>Clayton McIlrath &#187; best practices</title> <atom:link href="http://thinkclay.com/tag/best-practices/feed" rel="self" type="application/rss+xml" /><link>http://thinkclay.com</link> <description>Creative Media Design, Powered by Wordpress</description> <lastBuildDate>Tue, 10 Apr 2012 01:24:47 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>Tip of the Day: CSS Formatting</title><link>http://thinkclay.com/technology/tip-of-the-day-css-formatting</link> <comments>http://thinkclay.com/technology/tip-of-the-day-css-formatting#comments</comments> <pubDate>Wed, 07 Sep 2011 04:56:31 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[front-end]]></category> <category><![CDATA[Tip of the Day]]></category> <category><![CDATA[web standards]]></category> <guid
isPermaLink="false">http://thinkclay.com/?p=1526</guid> <description><![CDATA[One thing I really hate about agile front-end dev is the lack of formatting standards between devs. Some developers block their rules, others keep everything on one line. Some indent their rules, others don&#8217;t. The list goes on and on. I have a list of formatting rules that my team has adopted and all the [...]]]></description> <content:encoded><![CDATA[<p>One thing I really hate about agile front-end dev is the lack of formatting standards between devs. Some developers block their rules, others keep everything on one line. Some indent their rules, others don&#8217;t. The list goes on and on. I have a list of formatting rules that my team has adopted and all the front-end devs that I respect also follow, so if you care about improving your code and agile development, please adopt a standard of some sort and stand firm by it:</p><h3>Block vs Single Line</h3><p>Default to single line, because many rules will only contain one or two styles and its a waste and pain to scroll vertically through code. Most editors support the 80 column rule, so if your styles get longer than that, convert to block (easy to set a macro to do it for you in most IDE&#8217;s and editors).</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.foo</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;">#ccc</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.bar</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">29px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">7px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">16.2%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">26px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><h3>Indentation</h3><p>It&#8217;s so much easier to read code that is indented to show hierarchy and white space that separates or groups similar or related objects together. This is a standard I see most front-end developers following, but if you&#8217;re not, smack yourself now and get with the program.</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">ul <span style="color: #00AA00;">&#123;</span> <span style="color: #00AA00;">&#125;</span>
	li <span style="color: #00AA00;">&#123;</span> <span style="color: #00AA00;">&#125;</span>
		li a <span style="color: #00AA00;">&#123;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.foo</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
	<span style="color: #6666ff;">.bar</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span></pre></div></div><p>That&#8217;s all on formatting for now. Adopt these standards and read on, because I&#8217;m sure I&#8217;ll be back on this rant before too long.</p> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/technology/tip-of-the-day-css-formatting/feed</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Tip of the Day: Mobile Touch Events</title><link>http://thinkclay.com/technology/tip-of-the-day-mobile-touch-events</link> <comments>http://thinkclay.com/technology/tip-of-the-day-mobile-touch-events#comments</comments> <pubDate>Tue, 30 Aug 2011 00:17:54 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[front-end]]></category> <category><![CDATA[iOS]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[JS]]></category> <category><![CDATA[Mobile]]></category> <category><![CDATA[Tip of the Day]]></category> <category><![CDATA[web browser]]></category> <guid
isPermaLink="false">http://thinkclay.com/?p=1521</guid> <description><![CDATA[I recently got into a project that was a bit over my head. I had to build out a map that will work on desktop, mobile and tablets the same, but I quickly ran into issues tracking touch events in mobile Safari. All of the testing I was doing in iOS5 (beta) was working the [...]]]></description> <content:encoded><![CDATA[<p>I recently got into a project that was a bit over my head. I had to build out a map that will work on desktop, mobile and tablets the same, but I quickly ran into issues tracking touch events in mobile Safari. All of the testing I was doing in iOS5 (beta) was working the exact same way as the browser, where I could monitor a click and drag (touchmove) event and get the properties <em>pageX</em> and <em>pageY</em> directly from the event. However, on other mobile browsers (specifically iOS4 and older) this property was returning 0 everytime. I then found that multi-touch events store each finger press so I had to get the array of fingers and return the page coordinates. Long story short, here is the code I ended up implementing:</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;">document.<span style="color: #660066;">ontouchstart</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>e<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>e.<span style="color: #660066;">touches</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #006600; font-style: italic;">// Only deal with one finger</span>
		<span style="color: #003366; font-weight: bold;">var</span> touch <span style="color: #339933;">=</span> e.<span style="color: #660066;">touches</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// Get information for finger #1</span>
		    x <span style="color: #339933;">=</span> touch.<span style="color: #660066;">pageX</span><span style="color: #339933;">,</span>
		    y <span style="color: #339933;">=</span> touch.<span style="color: #660066;">pageY</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><h3>Further Reading on Mobile Touch Events in Javascript</h3><ul><li><a
href="http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/">iPhone Gesturing Explained</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/technology/tip-of-the-day-mobile-touch-events/feed</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Semantic Markup and Accessibility Standards</title><link>http://thinkclay.com/business/semantic-markup-and-accessibility-standards-an-overview</link> <comments>http://thinkclay.com/business/semantic-markup-and-accessibility-standards-an-overview#comments</comments> <pubDate>Mon, 03 Jan 2011 22:21:17 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Business]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[semantics]]></category> <category><![CDATA[web standards]]></category> <guid
isPermaLink="false">http://www.new-age-design.com/?p=132</guid> <description><![CDATA[Web Standards Guideline With growing technology and standards, I take pride in meeting new standards according to W3C, in order to achieve a highly functional site and good user experience for everyone. These standards include but aren’t limited to W3C standards, semantic markup, meeting WCAG usability standards, and Section 508 Compliance. This guide provides a [...]]]></description> <content:encoded><![CDATA[<h3>Web Standards Guideline</h3><p>With growing technology and standards, I take pride in meeting new standards according to W3C, in order to achieve a highly functional site and good user experience for everyone. These standards include but aren’t limited to <strong><a
title="World Wide Web Consortium - Standards for creating semantic and accessible web sites" href="http://w3.org">W3C</a> standards, semantic markup</strong>, meeting <strong><a
title="Web Content Accessibility Guidelines - Best practices for creating accessible websites" href="http://www.w3.org/TR/WCAG10/">WCAG</a> usability standards</strong>, and <strong><a
title="Section 508 - Government rules and regulations for accessible websites" href="http://www.section508.gov">Section 508</a> Compliance</strong>. This guide provides a medium level of understanding of accessibility standards. If anything in this article is confusing you, then I recommend you refer to Nathan&#8217;s post on <a
title="Nathan Beck - An overview on Creating Accessible Websites" href="http://www.redswish.co.uk/accessible-web-design-the-whats-and-whys/">Accessible Web Design</a> for a more broad prospective.</p><h3>Semantic Markup</h3><p>Working with HTML and XML markup languages, it’s important for the code to be standards compliant by using tags, structure, and information that can be read and translated by all browsers. <strong>Semantic Markup</strong> is just a way of structuring code so that a browser/machine can do more work and take less off the user. For example, search engines, like Google, are heavily driven on specific tags such as Meta information, Alt tags for images, recognizable XML and HTML formatting, etc. Using meta tags for keywords, content definition, and descriptions all improve functionality for search engines and browsers.</p><h3><a
title="Section 508 - Government rules and regulations for accessible websites" href="http://www.section508.gov">Section 508</a> overview</h3><ul><li><strong>Software Applications and Operating Systems:</strong> includes usability for people that are visually impaired, such as alternative keyboard navigation.</li><li><strong>Web-based Intranet, Internet Information, and Applications</strong>: assures accessibility to web page graphics by the visually impaired using assistant technology such as screen readers and refreshable Braille displays. This is accomplished by using text labels and descriptors for graphics.</li><li><strong>Telecommunications Products</strong>: addresses accessibility for people who are deaf or hard of hearing. This includes technology compatibility with hearing aids, assistant listening devices, and TTYs.</li><li><strong>Videos or Multimedia Products</strong>: includes requirements for captioning of multimedia products such as training or informational multimedia productions. Captioning or video descriptors must be able to be turned on or off.</li><li><strong>Self Contained, Closed Products</strong>: products with embedded software, such as information kiosks, copiers, and fax machines, often cannot be used with assistant technology. This standard requires that access features be built into these systems.</li><li><strong>Desktop and Portable Computers</strong>: discusses accessibility related to mechanically operated controls such as keyboards and touch screens.</li></ul><h3><a
title="Web Content Accessibility Guidelines - Best practices for creating accessible websites" href="http://www.w3.org/TR/WCAG10/">WCAG summary</a></h3><p>The Web Content Accessiblity Guidelines (WCAG) is the only international draft for following web standards. It describes standards that <em>may be used</em>, <em>should be used</em> and <em>must be used</em>. The WCAG is considered the stable version of standards, but for more current standards for accessible websites you can refer to the <a
title="Web Accessibility Initiatives - Defining modern standards for semantic and accessible web sites" href="http://www.w3.org/WAI/">Web Accessibility Initiative</a> (WAI). They define standards more relevent and specific to newer Web Browsers, Operating Systems, and so forth.</p><p>There is a lot of best practices and examples defined in the WCAG and WAI, and though these standards are important, not every web developer needs to know them by heart or implement them into every site. They are mainly important for sites that provide a service, such as e-commerce, educational resource, government sites, etc. That&#8217;s why many times you&#8217;ll notice that government sites and educational sites have poor creativity, because they need to focus on delivering content to all audiences more than aesthetics. However, if you&#8217;re a web developer and interested in learning more about standards and implementing the, refer to the WCAG and the WAI and start <strong>creating hierarchy using headers</strong>, <strong>putting navigation into lists</strong>, and <strong>using Title and Alt tags appropriately</strong>.</p><h3><a
title="World Wide Web Consortium - Standards for creating semantic and accessible web sites" href="http://www.w3.org/">W3C</a> summary</h3><p>The W3C is a working draft defining all aspects of markup languages and some Object Oriented Programming (OOP) languages used on the web. They define standards that are compatible across multiple browser, operating systems and languages. As web developers, we live by these standards and must know them to properly breakdown a website. These standards are a guideline that we follow in order to have our sites be dynamic and compliant for future technologies and software.</p><h3>Where does <em>your</em> site fall according to these standards?</h3><p>Below are some highlights that you should become familiar with as you populate a site with content. It’s important that if your site is developed by a professional that applies these standards, to ask for documentation on how to use functionality that may have been put into place for you, such as Meta tags, Header Tags, and Listed Links.</p><ul><li><strong>Compliance across all major Operating Systems</strong>: Windows XP, Windows Vista, and Mac OS X</li><li><strong>Access to the visually impaired</strong>: JAWS, Window-Eyes, and Hal</li><li><strong>W3C &amp; WCAG standards</strong></li><li><strong>Organic Search Engine Optimization</strong></li><li><strong>Meta information</strong> for pages, scrips, and images</li><li><strong>Alt tags</strong> for alternative text on images</li><li><strong>Color contrast</strong> and color schemes legible for those with color blindness or vision problems</li><li><strong>Em based layout and font</strong>: allowing sizes to be relevant to the browser-defined size for compatibility with mobile devices, increasing the font size in the browser, and different screen resolutions.</li><li><strong>Listed links</strong> for navigation hierarchy</li><li><strong>Header tags</strong> to establish Hierarchy and SEO</li></ul><h3>How I try and meet those standards in Web Development</h3><p>As a <strong>web developer</strong>, I know the standards well. Like an electrician must know state codes and regulations, I follow standards laid out by federal law (Section 508), good practice guidelines (W3C) and usability requirements (WCAG). I also make sure to read up on other articles and refer to other professionals to practice what is most commonly needed and used, for more in depth on how to tackle accessibility as a web developer, check out <a
title="Nathan Beck - Best practices for standards compliant and accessible web sites for Web Developers" href="http://www.redswish.co.uk/accessible-web-design-the-how/">Nathan&#8217;s post at redswish</a>.</p> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/business/semantic-markup-and-accessibility-standards-an-overview/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Setup SVN in Hostmonster Shared Hosting</title><link>http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting</link> <comments>http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting#comments</comments> <pubDate>Tue, 27 Apr 2010 06:09:26 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[Tutorial]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[developer tools]]></category> <category><![CDATA[personal]]></category> <category><![CDATA[resources]]></category> <category><![CDATA[Shell]]></category> <category><![CDATA[SVN]]></category> <category><![CDATA[Terminal]]></category> <category><![CDATA[Versioning]]></category> <guid
isPermaLink="false">http://thinkclay.com/?p=1335</guid> <description><![CDATA[<a
href="http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting"><img
src="http://thinkclay.com/wp-content/uploads/2010/04/svn-hostmonster.jpg" alt="" title="svn-hostmonster" width="300" height="200" class="alignleft" /></a> I've had my fair share of installs in <strong>shared hosting</strong>, but sometimes simple things like <strong>SVN</strong> can get very tricky with providers like <strong>Hostmonster</strong> or <strong>BlueHost</strong>. I hope that this shell will work as well for you as it has for me. Just copy the code and paste into a file on your server <em>svninstall.sh</em> and then to run just execute <em>. .svninstall.sh</em> and you're off! Comment here if you get and errors and I'd be glad to help.]]></description> <content:encoded><![CDATA[<p>I&#8217;ve had my fair share of installs in <strong>shared hosting</strong>, but sometimes simple things like <strong>SVN</strong> can get very tricky with <strong>hosting providers</strong> like <strong>Hostmonster</strong> or <strong>BlueHost</strong>. I hope that this shell will work as well for you as it has for me. Just copy the code and paste into a file on your server (i called mine <em>svninstall.sh</em>) and then to run just execute <em>. .svninstall.sh</em> and you&#8217;re off! Comment here if you get and errors and I&#8217;d be glad to help. Also if you get stuck, take into consideration that there are other <a
href="http://www.hostingobserver.com">inexpensive web hosting</a> and <a
href="http://www.peer1.com/hosting/cloud-services.php">cloud server hosting</a> companies that you can work with, so before smashing your head against the wall, look around for a better solution.</p><div
class="wp_syntax"><div
class="code"><pre class="shell" style="font-family:monospace;">#!/bin/sh
&nbsp;
export svn=1.6.9
export ipath=$HOME/tools64/
export dev=$HOME/dev/svn
&nbsp;
mkdir -p $ipath
mkdir -p $dev
cd $dev
&nbsp;
if [ ! -f $dev/subversion-deps-$svn/__download ] ; then
	rm subversion-deps-$svn.tar.bz2*
	wget http://subversion.tigris.org/downloads/subversion-deps-$svn.tar.bz2 &amp;amp;&amp;amp; \
		tar -xjf subversion-deps-$svn.tar.bz2 &amp;amp;&amp;amp; \
		mv subversion-$svn subversion-deps-$svn &amp;amp;&amp;amp; \
		touch  subversion-deps-$svn/__download
	rm subversion-deps-$svn.tar.bz2.*
fi
if [ ! -f $dev/subversion-$svn/__download ] ; then
	rm subversion-$svn.tar.bz2*
	wget http://subversion.tigris.org/downloads/subversion-$svn.tar.bz2 &amp;amp;&amp;amp; \
		tar -xjf subversion-$svn.tar.bz2 &amp;amp;&amp;amp; \
		touch  subversion-$svn/__download
	rm subversion-$svn.tar.bz2*
fi
&nbsp;
export o=&quot; --prefix=$ipath LDFLAGS=&quot;-L$ipath/lib&quot; CPPFLAGS=&quot;-I$ipath/include&quot; CFLAGS=&quot;-I$ipath/include&quot; &quot;
export oapr=&quot; --with-apr=$ipath/bin/apr-1-config &quot;
export oapu=&quot; --with-apr-util=$ipath/bin/apu-1-config &quot;
&nbsp;
export pdep=$dev/subversion-deps-$svn
export psvn=$dev/subversion-$svn
&nbsp;
export PATH=$ipath/bin:$PATH
&nbsp;
#compile zlib
cd $pdep/zlib
export CFLAGS='-fPIC'
if [ ! -f _done ] ; then
	make clean
	./configure --prefix=$ipath
	make &amp;amp;&amp;amp; touch _done
fi
make install
&nbsp;
# compile APR
cd $pdep/apr
if [ ! -f _done ] ; then
	make clean
	./configure $o
	make &amp;amp;&amp;amp; touch _done
fi
make install
&nbsp;
# compile neon
cd $pdep/neon
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr
	make &amp;amp;&amp;amp; touch _done
fi
make install
&nbsp;
#compile sqlite
cd $pdep/sqlite-amalgamation
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr
	make &amp;amp;&amp;amp; touch _done
fi
make install
&nbsp;
# compile Berkeley DB
cd $pdep
if [ ! -f db-5.0.21/__download ] ; then
	rm db-5.0.21.tar.gz*
	wget http://download.oracle.com/berkeley-db/db-5.0.21.tar.gz &amp;amp;&amp;amp; \
		tar -xzf db-5.0.21.tar.gz &amp;amp;&amp;amp; \
		touch  db-5.0.21/__download
	rm db-5.0.21.tar.gz*
fi
cd $pdep/db-5.0.21/build_unix
if [ ! -f _done ] ; then
	make clean
	../dist/configure $o $oapr
	make &amp;amp;&amp;amp; touch _done
fi
make install
&nbsp;
# compile APR-util after Berkeley. This way svn find berkeley automatically
cd $pdep/apr-util
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr --with-berkeley-db=$ipath/include:$ipath/lib
	make &amp;amp;&amp;amp; touch _done
fi
make install
&nbsp;
# compile serf
cd $pdep/serf
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr $oapu
	make &amp;amp;&amp;amp; touch _done
fi
make install
&nbsp;
# finaly, build svn
cd $psvn
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr
	make &amp;amp;&amp;amp; touch _done
fi
make install</pre></div></div> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting/feed</wfw:commentRss> <slash:comments>13</slash:comments> </item> <item><title>FBJS Slider Carousel</title><link>http://thinkclay.com/tutorial/fbjs-slider-carousel</link> <comments>http://thinkclay.com/tutorial/fbjs-slider-carousel#comments</comments> <pubDate>Tue, 13 Apr 2010 04:50:25 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Tutorial]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[developer tools]]></category> <category><![CDATA[Facebook]]></category> <category><![CDATA[FBJS]]></category> <category><![CDATA[front-end]]></category> <category><![CDATA[JS]]></category> <guid
isPermaLink="false">http://thinkclay.com/?p=1325</guid> <description><![CDATA[I&#8217;ve made a nice little FBJS Slider that I use quite often for animation within facebook. I hope that little snippets and code like this will help other developers make more interested and appealing Facebook applications. If you want to hire or request help with fbjs, fbml, or facebook development in general, you can do [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve made a nice little <strong>FBJS Slider</strong> that I use quite often for animation within facebook. I hope that little snippets and code like this will help other developers make more interested and appealing Facebook applications. If you want to hire or request help with fbjs, fbml, or facebook development in general, you can do so by contacting my company <a
href="http://chosencollective.com">Chosen</a></p><h3>First with the styling</h3><p>#slideWrap creates an extremely wide canvas for the slide to fit on aligned horizontally.<br
/> #wrapper then creates a sort of viewport to view the slides through.</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">&lt;style type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #00AA00;">&gt;</span>
<span style="color: #cc00cc;">#wrapper</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">520px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#slideWrap</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">9000px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.slide</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">520px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#wrapper</span> <span style="color: #cc00cc;">#slideNav</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-2.75em</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">2em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
	<span style="color: #cc00cc;">#slideNav</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
		<span style="color: #cc00cc;">#slideNav</span> li a <span style="color: #00AA00;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">http://cmcilrath.rssready.net/xcel/assets/images/bg_slideNav.png?v=3</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #933;">-12px</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">.5em</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-999em</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
		<span style="color: #00AA00;">&#125;</span>
		<span style="color: #cc00cc;">#slideNav</span> li a<span style="color: #6666ff;">.next</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#slideNav</span> li a<span style="color: #6666ff;">.prev</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;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
		<span style="color: #cc00cc;">#slideNav</span> li a<span style="color: #6666ff;">.selected</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-12px</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
		<span style="color: #cc00cc;">#slideNav</span> li<span style="color: #cc00cc;">#prevSlide</span> a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
		<span style="color: #cc00cc;">#slideNav</span> li<span style="color: #cc00cc;">#prevSlide</span> a<span style="color: #6666ff;">.disabled</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">bottom</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
		<span style="color: #cc00cc;">#slideNav</span> li<span style="color: #cc00cc;">#nextSlide</span> a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
		<span style="color: #cc00cc;">#slideNav</span> li<span style="color: #cc00cc;">#nextSlide</span> a<span style="color: #6666ff;">.disabled</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">bottom</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></div></div><h3>The FBJS script</h3><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;!--</span>
<span style="color: #003366; font-weight: bold;">function</span> Each<span style="color: #009900;">&#40;</span>array<span style="color: #339933;">,</span> block<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</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> l <span style="color: #339933;">=</span> array.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>l<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		block<span style="color: #009900;">&#40;</span>array<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> currentSlide <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> maxSlides <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> animating <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> slideWidth <span style="color: #339933;">=</span> <span style="color: #CC0000;">520</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> currentPX <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> nextSlide<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> nextSlideNum <span style="color: #339933;">=</span> currentSlide <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>nextSlideNum <span style="color: #339933;">&gt;=</span> maxSlides<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</span><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>nextSlideNum <span style="color: #339933;">==</span> <span style="color: #CC0000;">2</span> <span style="color: #339933;">&amp;&amp;</span> currentSlide <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
	currentSlide <span style="color: #339933;">=</span> nextSlideNum<span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>animating <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> prevSlide<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> prevSlideNum <span style="color: #339933;">=</span> currentSlide <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>prevSlideNum <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</span><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>currentSlide <span style="color: #339933;">==</span> maxSlides<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
	currentSlide <span style="color: #339933;">=</span> prevSlideNum<span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>animating <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> toggleButton<span style="color: #009900;">&#40;</span>button<span style="color: #339933;">,</span>state<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>button <span style="color: #339933;">==</span> <span style="color: #3366CC;">'next'</span> <span style="color: #339933;">&amp;&amp;</span> state <span style="color: #339933;">==</span> <span style="color: #3366CC;">'disable'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'nextSlide'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setInnerXHTML</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;a href=&quot;#&quot; class=&quot;next disabled&quot;&gt;next slide &amp;gt;&lt;/a&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span>nextSlide<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>button <span style="color: #339933;">==</span> <span style="color: #3366CC;">'next'</span> <span style="color: #339933;">&amp;&amp;</span> state <span style="color: #339933;">==</span> <span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'nextSlide'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setInnerXHTML</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;a href=&quot;#&quot; class=&quot;next&quot;&gt;next slide &amp;gt;&lt;/a&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span>nextSlide<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>button <span style="color: #339933;">==</span> <span style="color: #3366CC;">'prev'</span> <span style="color: #339933;">&amp;&amp;</span> state <span style="color: #339933;">==</span> <span style="color: #3366CC;">'disable'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prevSlide'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setInnerXHTML</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;a href=&quot;#&quot; class=&quot;prev disabled&quot;&gt;&amp;lt; previous slide&lt;/a&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span>prevSlide<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>button <span style="color: #339933;">==</span> <span style="color: #3366CC;">'prev'</span> <span style="color: #339933;">&amp;&amp;</span> state <span style="color: #339933;">==</span> <span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prevSlide'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setInnerXHTML</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;a href=&quot;#&quot; class=&quot;prev&quot;&gt;&amp;lt; previous slide&lt;/a&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span>prevSlide<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span>direction<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	Each<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;slideNav&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">as</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">as</span>.<span style="color: #660066;">removeClassName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;selected&quot;</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;
	document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;slideNav-&quot;</span><span style="color: #339933;">+</span>currentSlide<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClassName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;selected&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	animating <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> pixelShift <span style="color: #339933;">=</span> slideWidth <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>currentSlide<span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> startingSlideNum <span style="color: #339933;">=</span> currentSlide<span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> Slide_container <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'slideWrap'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>direction <span style="color: #339933;">==</span> <span style="color: #3366CC;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		Animation<span style="color: #009900;">&#40;</span>Slide_container<span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">by</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'-'</span> <span style="color: #339933;">+</span> pixelShift <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">from</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'-'</span> <span style="color: #339933;">+</span> currentPX <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">by</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'right'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'-'</span> <span style="color: #339933;">+</span> pixelShift <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">from</span><span style="color: #009900;">&#40;</span>currentPX <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">duration</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ease</span><span style="color: #009900;">&#40;</span>Animation.<span style="color: #660066;">ease</span>.<span style="color: #660066;">both</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">checkpoint</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</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;">if</span><span style="color: #009900;">&#40;</span>startingSlideNum <span style="color: #339933;">==</span> currentSlide<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> animating<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
				<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</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: #660066;">go</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: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>direction <span style="color: #339933;">==</span> <span style="color: #3366CC;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		Animation<span style="color: #009900;">&#40;</span>Slide_container<span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">by</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'right'</span><span style="color: #339933;">,</span> pixelShift <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">from</span><span style="color: #009900;">&#40;</span>currentPX <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">by</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'-'</span> <span style="color: #339933;">+</span> pixelShift <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">from</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'-'</span> <span style="color: #339933;">+</span> currentPX <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">duration</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ease</span><span style="color: #009900;">&#40;</span>Animation.<span style="color: #660066;">ease</span>.<span style="color: #660066;">both</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">checkpoint</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</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;">if</span><span style="color: #009900;">&#40;</span>startingSlideNum <span style="color: #339933;">==</span> currentSlide<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> animating<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
				<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'right'</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: #660066;">go</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	currentPX <span style="color: #339933;">=</span> pixelShift<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> showSlide<span style="color: #009900;">&#40;</span>num<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	startingSlide <span style="color: #339933;">=</span> currentSlide<span style="color: #339933;">;</span>
	currentSlide <span style="color: #339933;">=</span> num<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>num <span style="color: #339933;">&gt;</span> startingSlide<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><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>num <span style="color: #339933;">&lt;</span> startingSlide<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>startingSlide <span style="color: #339933;">==</span> maxSlides <span style="color: #339933;">&amp;&amp;</span> currentSlide <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</span><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>currentSlide <span style="color: #339933;">==</span> maxSlides <span style="color: #339933;">&amp;&amp;</span> startingSlide <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</span><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>currentSlide <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</span><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>currentSlide <span style="color: #339933;">==</span> maxSlides<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</span><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>startingSlide <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</span><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>startingSlide <span style="color: #339933;">==</span> maxSlides<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</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: #006600; font-style: italic;">//--&gt;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div><h3>FBML Markup</h3><p>Simple markup here, slideNav controls the slide with onclicks, the JS does the magic.</p><div
class="wp_syntax"><div
class="code"><pre class="xhtml" style="font-family:monospace;">&lt;div id=&quot;wrapper&quot;&gt;
	&lt;h2&gt;Header&lt;/h2&gt;
	&lt;ul id=&quot;slideNav&quot;&gt;
		&lt;li id=&quot;prevSlide&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;prev disabled&quot;&gt;&amp;lt; previous slide&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slideNav-1&quot; onclick=&quot;showSlide(1); return false;&quot; class=&quot;selected&quot;&gt;1&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slideNav-2&quot; onclick=&quot;showSlide(2); return false;&quot;&gt;2&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slideNav-3&quot; onclick=&quot;showSlide(3); return false;&quot;&gt;3&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slideNav-4&quot; onclick=&quot;showSlide(4); return false;&quot;&gt;4&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slideNav-5&quot; onclick=&quot;showSlide(5); return false;&quot;&gt;5&lt;/a&gt;&lt;/li&gt;
		&lt;li id=&quot;nextSlide&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;next&quot; onclick=&quot;nextSlide(); return false;&quot;&gt;&amp;gt;&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;div id=&quot;slideWrap&quot;&gt;
        &lt;div id=&quot;slide_1&quot; class=&quot;slide&quot;&gt;
			&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Title 1&lt;/a&gt;&lt;/h3&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;/div&gt;
&nbsp;
        &lt;div id=&quot;slide_2&quot; class=&quot;slide&quot;&gt;
			&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Title 2&lt;/a&gt;&lt;/h3&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;/div&gt;
&nbsp;
        &lt;div id=&quot;slide_3&quot; class=&quot;slide&quot;&gt;
			&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Title 3&lt;/a&gt;&lt;/h3&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;/div&gt;
&nbsp;
        &lt;div id=&quot;slide_4&quot; class=&quot;slide&quot;&gt;
			&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Title 4&lt;/a&gt;&lt;/h3&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;/div&gt;
&nbsp;
        &lt;div id=&quot;slide_5&quot; class=&quot;slide&quot;&gt;
			&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Title 5&lt;/a&gt;&lt;/h3&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;/div&gt;
	&lt;/div&gt;
	&lt;!-- end slideWrap --&gt;
&lt;/div&gt;</pre></div></div> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/tutorial/fbjs-slider-carousel/feed</wfw:commentRss> <slash:comments>34</slash:comments> </item> <item><title>Getting Started with Facebook JS (FBJS)</title><link>http://thinkclay.com/technology/getting-started-with-facebook-js-fbjs</link> <comments>http://thinkclay.com/technology/getting-started-with-facebook-js-fbjs#comments</comments> <pubDate>Thu, 25 Feb 2010 05:16:13 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[Facebook]]></category> <category><![CDATA[FBJS]]></category> <category><![CDATA[front-end]]></category> <category><![CDATA[JS]]></category> <guid
isPermaLink="false">http://thinkclay.com/?p=1314</guid> <description><![CDATA[<a
href="http://thinkclay.com/technology/getting-started-with-facebook-js-fbjs"><img
src="http://thinkclay.com/wp-content/uploads/2010/02/facebook-js-fbjs.jpg" alt="" title="facebook-js-fbjs" width="300" height="200" class="alignleft" /></a> I’ve only recently started developing Facebook Apps and being a strong front-end developer I was confident that I would be able to pickup FBJS quickly. My confidence what short-lived however, once i discovered that Facebook had a very restricting framework and cache system that would make JS programming something quite a bit less desirable than awesome frameworks like jQuery.]]></description> <content:encoded><![CDATA[<p>I&#8217;ve only recently started developing Facebook Apps and being a strong front-end developer I was very confident that I would be able to pickup FBJS quickly like I have with many other Javascript Frameworks. My confidence what short-lived however, once I discovered that Facebook had a very restricting framework and cache system that would make JS programming something quite a bit less desirable than awesome frameworks like jQuery or Prototype</p><h3>What you CAN&#8217;T do in FBJS</h3><p>I learned very quickly, that Facebook JavaScript does not allow some very common native functions such as onload, arrays and alerts as well as access to many properties of the document or window level of the DOM. There are workarounds and alternative methods that you can use instead:</p><h4>window.onload in FBJS</h4><p>Instead of using <em>window.onload</em> to initialize your functions, use <em>setTimeout</em>.</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;">setTimeout<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;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Even an empty setTimout at the beginning of your script will kick start your functions which would normally auto init (this seems to work fine in canvas, but not so much in tabs).</p><h4>alert alternative for FBJS</h4><p>Since you can&#8217;t use alert or document.write, use Facebook&#8217;s dialog box:</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">new</span> Dialog<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">showMessage</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Dialog'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'This is text'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><h4>document.write alternative for FBJS</h4><p>Since you don&#8217;t have access to the document or window levels of the DOM, you&#8217;ll want to setup a little include for testing. I drop in this code when i want to quickly output:</p><div
class="wp_syntax"><div
class="code"><pre class="html" style="font-family:monospace;">&lt;script&gt;
function logOutput(){
    var text = &quot;This will be inserted into my log div&quot;;
    document.getElementById('log').setTextValue(text);
}
&lt;/script&gt;
&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;</pre></div></div><h4>Trouble with JS Arrays in Facebook</h4><p>For whatever reason, facebook also decided to rip out support for creating objects which also eliminated the way most of us make arrays:</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// new Array() is not supported in FBJS</span>
<span style="color: #003366; font-weight: bold;">var</span> myarray <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
myarray<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'stuff'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// or</span>
myarray<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'foo'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'bar'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// or </span>
myarray.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'another example'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>More to come as I wrestle further with Facebook. Any tips or comments are greatly appreciated!</p> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/technology/getting-started-with-facebook-js-fbjs/feed</wfw:commentRss> <slash:comments>19</slash:comments> </item> <item><title>Zen Coding</title><link>http://thinkclay.com/technology/zen-coding</link> <comments>http://thinkclay.com/technology/zen-coding#comments</comments> <pubDate>Mon, 23 Nov 2009 20:22:13 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[automate]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[developer tools]]></category> <category><![CDATA[front-end]]></category> <category><![CDATA[MAC]]></category> <category><![CDATA[PC]]></category> <category><![CDATA[semantics]]></category> <guid
isPermaLink="false">http://thinkclay.com/?p=1193</guid> <description><![CDATA[As a developer, I&#8217;m always looking for ways to improve my coding practices and efficiency. In the programming world, I work almost completely with frameworks such as Zend and CodeIgnitor using MVC at it&#8217;s fullest. On the front-end, I&#8217;ve learned to use Blueprint CSS combined with semantic markup to standardize my layouts. But now, I&#8217;ve [...]]]></description> <content:encoded><![CDATA[<p>As a developer, I&#8217;m always looking for ways to improve my coding practices and efficiency. In the programming world, I work almost completely with frameworks such as <a
href="http://www.zend.com/">Zend</a> and <a
href="http://codeigniter.com/">CodeIgnitor</a> using <a
href="http://www.oreillynet.com/onlamp/blog/2007/06/what_is_mvc.html">MVC</a> at it&#8217;s fullest. On the front-end, I&#8217;ve learned to use <a
href="http://blueprintcss.org">Blueprint CSS</a> combined with semantic markup to standardize my layouts. But now, I&#8217;ve added another INCREDIBLE tool to my belt, and I want to share it with all of you as well.. <strong>Zen Coding</strong></p><h2>What is Zen Coding?</h2><p>From a general perspective Zen Coding is simply the practice of making lightweight and reusable code to allow for peaceful coding and debugging (that&#8217;s my definition anyways). There has been a movement in the front-end development community towards finding new ways to use <a
href="http://www.csszengarden.com/">CSS with semantic markup</a> in order to produce the desired layouts and styles. Now Sergey Chikuyonok has taken that to a whole new level. He&#8217;s reversed the idea of Zen Coding using HTML markup to generate CSS Selectors and allowed us to create our markup from using CSS Selectors. This might seem confusing, so lets look at some code:</p><p>Plain and simply put, the Zen Coding plugin (supported on multiple text editors) translates code like this:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">div<span style="color: #cc00cc;">#header</span><span style="color: #00AA00;">&gt;</span>ul.nav<span style="color: #00AA00;">&gt;</span>li<span style="color: #00AA00;">*</span><span style="color: #cc66cc;">5</span></pre></div></div><p>into this:</p><div
class="wp_syntax"><div
class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;header&quot;&gt;
	&lt;ul class=&quot;nav&quot;&gt;
		&lt;li&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/li&gt;
	&lt;/ul&gt;
&lt;/div&gt;</pre></div></div><p>.. and yet, this is still nothing folks! Dive in deeper over at <a
href="http://www.smashingmagazine.com/2009/11/21/zen-coding-a-new-way-to-write-html-code/">Smashing Mag</a></p> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/technology/zen-coding/feed</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Where to start learning Web Development</title><link>http://thinkclay.com/technology/where-to-start-learning-web-development</link> <comments>http://thinkclay.com/technology/where-to-start-learning-web-development#comments</comments> <pubDate>Thu, 11 Jun 2009 20:13:29 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[developer tools]]></category> <category><![CDATA[freelance]]></category> <category><![CDATA[front-end]]></category> <category><![CDATA[resources]]></category> <category><![CDATA[semantics]]></category> <category><![CDATA[web standards]]></category> <guid
isPermaLink="false">http://thinkclay.com/?p=1016</guid> <description><![CDATA[<a
href="http://thinkclay.com/technology/where-to-start-learning-web-development" title="Learn Web Development"><img
src="http://thinkclay.com/wp-content/uploads/2009/06/start-web-development.jpg" alt="Start Learning Web Development" title="start-web-development" width="300" height="200" class="alignleft" /></a>There are SO MANY articles out there that get very deep into <strong>web development</strong> and programming concepts, but not many people know what to start learning if you're just starting in this field. I've put together a well-rounded list of resources and websites to read on a regular basis and learn as much as you can. If you become familiar with all of these websites, you'll quickly be the best in your field. All the information is free to anyone with a passion or desire to learn.]]></description> <content:encoded><![CDATA[<p><a
href="http://thinkclay.com/technology/where-to-start-learning-web-development" title="Learn Web Development"><img
src="http://thinkclay.com/wp-content/uploads/2009/06/start-web-development.jpg" alt="Start Learning Web Development" title="start-web-development" width="300" height="200" class="alignleft" /></a>There are SO MANY articles out there that get very deep into <strong>web development</strong> and programming concepts, but not many people know what to start learning if you&#8217;re just starting in this field. I&#8217;ve put together a well-rounded list of resources and websites to read on a regular basis and learn as much as you can. If you become familiar with all of these websites, you&#8217;ll quickly be the best in your field. All the information is free to anyone with a passion or desire to learn.</p><h2>Validators</h2><ul><li><a
href="http://www.totalvalidator.com">Total Validator</a>: simple HTML/CSS Validator with browser plugin support</li><li><a
href="http://validator.w3.org/">W3C Validator</a>: the organization that defines markup standards, and validates according to those standards</li><li><a
href="http://www.cynthiasays.com/">Cynthia Says</a>: screen reader which will help you with accessibility in mind</li></ul><h2>Accessibility</h2><ul><li><a
href="http://www.webaim.org/intro/">WebAIM</a>: Introduction to Accessibility</li><li><a
href="http://www.w3.org/TR/WCAG10/">WCAG</a>: Web Content Accessibility Guidelines</li><li><a
href="http://www.w3.org/WAI/intro/wcag.php">WCAG Overview</a>: Overview of WCAG Standards</li><li><a
href="http://www.w3.org/WAI/wcag-curric/overgid.htm">WCAG Tutorial</a>: A useful educational resource to learn the standards</li><li><a
href="http://www.section508.gov/index.cfm?FuseAction=Content&#038;ID=11">Section 508</a>: Federal requirements for web accessibility</li></ul><h2>Javascript Libraries</h2><ul><li><a
href="http://jquery.com">jQuery</a></li><li><a
href="http://script.aculo.us">Prototype / Scriptaculous</a></li><li><a
href="mootools.net">MooTools</a></li></ul><h2>Firefox Plugins for Developers</h2><ul><li><a
href="https://addons.mozilla.org/en-US/firefox/addon/2289">CSS Validator</a></li><li><a
href="https://addons.mozilla.org/en-US/firefox/addon/2104">CSS Viewer</a></li><li><a
href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer Toolbar</a></li><li><a
href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug</a></li></ul><h2>Tutorials</h2><ul><li><a
href="http://www.w3schools.com/">W3Schools</a>: Very in-depth, free tutorials on the most commonly used web markup and programming languages</li><li><a
href="http://www.alistapart.com">A List Apart</a>: Articles and tutorials on an extensive list of topics</li><li><a
href=" http://www.quirksmode.org/resources.html">QuirksMode</a>: Good articles and test pages concerning javascript and CSS</li></ul> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/technology/where-to-start-learning-web-development/feed</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Market Yourself: Product and Promotion</title><link>http://thinkclay.com/business/market-yourself-product-promotion</link> <comments>http://thinkclay.com/business/market-yourself-product-promotion#comments</comments> <pubDate>Mon, 25 May 2009 16:44:44 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Business]]></category> <category><![CDATA[Marketing]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[resources]]></category> <guid
isPermaLink="false">http://thinkclay.com/?p=955</guid> <description><![CDATA[<a
href="http://thinkclay.com/business/market-yourself-product-promotion"><img
height="200" width="300" class="alignleft" title="Clever Product Packaging" alt="Clever Product Packaging" src="http://thinkclay.com/wp-content/uploads/2009/05/4-2-300x200.jpg"/></a>Third post in the Market Yourself Series. After following the other posts in the series by <a
title="Market Yourself: Self Discover" href="http://thinkclay.com/business/market-your-self-discovery">discovery your motivation</a> and <a
title="Market Yourself: Research" href="http://thinkclay.com/business/market-yourself-research">researching your market and demographic</a>, it’s time to start refining and improving your product (or service) and learning how to properly promote it using the "4 P" model (Product, Price, Placement, Promotion) and the "A 3P S" model (Advertising, Publicity, Packaging, Personal selling, Sales promotion / incentives)]]></description> <content:encoded><![CDATA[<p><a
href="http://thinkclay.com/business/market-yourself-product-promotion"><img
height="200" width="300" class="alignleft" title="Clever Product Packaging" alt="Clever Product Packaging" src="http://thinkclay.com/wp-content/uploads/2009/05/4-2-300x200.jpg"/></a>Third post in the Market Yourself Series. After following the other posts in the series by <a
title="Market Yourself: Self Discover" href="http://thinkclay.com/business/market-your-self-discovery">discovery your motivation</a> and <a
title="Market Yourself: Research" href="http://thinkclay.com/business/market-yourself-research">researching your market and demographic</a>, it’s time to start refining and improving your product (or service) and learning how to properly promote it using the &#8220;4 P&#8221; model (Product, Price, Placement, Promotion) and the &#8220;A 3P S&#8221; model (Advertising, Publicity, Packaging, Personal selling, Sales promotion / incentives)</p><h2>The Four-P&#8217;s</h2><p>If you&#8217;ve taken an advertising or marketing class, you&#8217;ll know what the <em>Four P&#8217;s</em> are already: <b>P</b>roduct, <b>P</b>rice, <b>P</b>lacement, and <b>P</b>romotion. These are the four keys to selling a product or service, and will help you change how you market them:</p><h3>Product</h3><p>The product (or service) should be the first thing you analyze and possibly get some non-bias feedback on. Answer some simple questions by both your expertise and a few external opinions:</p><ul><li>What is the total cost to make/produce/ship the product?</li><li>What is the quality of the product, and what guarantees/maintenance do you offer?</li><li>How well does your product compete against competition?</li></ul><h3>Price</h3><p>Math is one of the most important factors in determining long term success of a product. Start by breaking down the data that you have: <em>price &#8211; cost = profit</em>. How well does your product compete on a price level? What is the percentage of profit made, and do the long-term profits exceed the costs of marketing, advertising, promotion, etc?</p><h3>Placement</h3><p><em>Location, location, location!</em> We&#8217;ve all heard that phrase, and for good reason. Location really matters. You can sell a pile of junk if it&#8217;s in the right location. Analyze location/placement in a hierarchy:</p><ul><li>What city are you located in (analyze demographic and potential number of customers in that city)</li><li>Once you have a rough estimate on that number, consider your store location and how many of those customers see it</li><li>How well do you position you product (physically or mentally) when customers enter your doors (or website even)?</li></ul><h3>Promotion</h3><p>Once you&#8217;ve figured out all that data, you have the tools necessary to start promoting yourself. If it&#8217;s a new product/service/business then jump right into the Promotional Mix. Otherwise start by analyzing how information is distributed and advertised currently and give some thought to the strengths and weaknesses of your current tactics before reading the next bit.</p><h2>A-Three-PS (The Promotional Mix)</h2><p>The A-Three-PS model is the biggest key to promoting your product or service. Within each of these points there are other branches and such that are important also, but for the most part, every type of promotion falls within the A  3P S: <b>A</b>dvertising, <b>P</b>ublicity, <b>P</b>ackaging, <b>P</b>ersonal selling, <b>S</b>ales promotion.</p><h3>Advertising</h3><p>Advertising comes in many names and shapes, but put simply, advertising is <em>a form of promotion that explicitly details the product and markets it towards a specific demographic</em>. I&#8217;ll go deeper into advertising with another post, but here&#8217;s a quick look at the most popular methods of advertising:</p><ul><li>Web Media (pay-per-click advertising, social media, viral marketing)</li><li>Outdoor (vehicles with large ads, billboards, building ads, posters)</li><li>Print Media (business cards, brochures, newspaper)</li><li>Broadcast Media (television, radio, live web feeds)</li></ul><h3>Publicity</h3><p>This is one of the most impressive ways to promote your product and usually causes a huge spike, but is not necessarily a steady flow or good model to base your business. Publicity can come in many ways, whether it&#8217;s word-of-mouth, a promotional event, news story, or some crazy stunt. Usually it comes at little to no cost (because it pays off whatever costs their may have been), and generally has a greater impact for immediate business, but as I mentioned.. is not a steady source of income. This is a great place to start for a new and emerging business, and is also highly effective when combined with other promotional resources (such as Sales Promotion).</p><h3>Packaging</h3><p>It&#8217;s so amazing how packaging effects a consumer&#8217;s decision to purchase. Packaging is huge, whether it&#8217;s a physical product, how you package/sell your product online, etc. This is where you can be creative and stand out from your competitors. Rather than going into too much detail about how creative packaging works, check out some of these links for yourself:</p><ul><li><a
href="http://www.smashingmagazine.com/2008/06/02/beautiful-and-expressive-packaging-design/">Highly Creative Product Packaging</a></li><li><a
href="http://designfeedr.com/inspiring-packaging-design">More Creative Product Packaging</a></li><li><a
href="http://designfeedr.com/more-awesome-product-packaging">Food and Beverage Product Packaging</a></li></ul><h3>Personal Selling</h3><p>Out of all the forms of promotion, most businesses either nail the others and miss this or nail this and miss the others. <em>Personal Selling is a face-to-face interaction that takes the product from beginning of sale to closing of sale.</em> This is crucial in selling a large product like a car, boat, or expensive service. Generally anything that is selling for over $3000 is going to require personal selling. I have seen many businesses flop because they didn&#8217;t promote themselves, meet with clients, or sell on a personal level. If you have any product or service that is near or above $3k, put this on the top of your list of skills to master!!</p><h3>Sales Promotion or Incentives</h3><p>You&#8217;ll see this form of advertising at almost any retail store. Sales cause hype which becomes a free promotion by word-of-mouth. Sales can be really effective on an older, polished product to draw the user to look at a new product that you are promoting.</p><blockquote><p>Take a wireless store for example. You&#8217;ll often see sales incentives offering you a deal with a new phone. They will often promote a free bluetooth headset, or a discounted price with a 2 year contract. These are sales promotions that seem like a good deal (and often can be), but for the store have large turnover. Either the bluetooth headset is really cheap for the store to give away, and the smart phone that you&#8217;re paying $500 for easily covers the cost.. or a free phone with a 2 year contract.. you just buahg the phone for your monthly payment * 24 months!</p></blockquote><p>Sales can be combined in so many ways, that it would be impossible to give all the different examples. The biggest thing to note when promoting a sale or incentive is what your costs are, how much the price outweighs the cost, and how that is presented to the consumer. If you take those three point into consideration, and combine this form of promotion with some form of advertising, it should be a large success.</p> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/business/market-yourself-product-promotion/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Photoshop Shortcuts (PC)</title><link>http://thinkclay.com/technology/photoshop-shortcuts-pc</link> <comments>http://thinkclay.com/technology/photoshop-shortcuts-pc#comments</comments> <pubDate>Tue, 24 Mar 2009 18:52:17 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Creativity]]></category> <category><![CDATA[Technology]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[desktop]]></category> <category><![CDATA[developer tools]]></category> <category><![CDATA[digital art]]></category> <category><![CDATA[goals]]></category> <category><![CDATA[graphic design]]></category> <category><![CDATA[MAC]]></category> <category><![CDATA[PC]]></category> <category><![CDATA[personal]]></category> <category><![CDATA[photoshop]]></category> <guid
isPermaLink="false">http://thinkclay.com/?p=799</guid> <description><![CDATA[<a
href="http://thinkclay.com/creativity/photoshop-shortcuts-pc"><img
class="alignleft" src="http://thinkclay.com/wp-content/uploads/2009/03/photoshop-shortcuts.jpg" alt="image preview of photoshop shortcuts" title="photoshop shortcuts" width="300" height="200" class="size-full wp-image-809" /></a>Learning keyboard shortcuts helps you improve efficiency and performance in any almost any program. I find this especially true for Photoshop since much of the design process is done with a mouse, it helps to train the other hand to use shortcuts and type in small amounts. In posting this, I hope to reference it myself to memorize and learn these shortcuts, and hopefully others will bookmark and reference this page as well.]]></description> <content:encoded><![CDATA[<p><a
href="http://thinkclay.com/creativity/photoshop-shortcuts-pc"><img
class="alignleft" src="http://thinkclay.com/wp-content/uploads/2009/03/photoshop-shortcuts.jpg" alt="image preview of photoshop shortcuts" title="photoshop shortcuts" width="300" height="200" class="size-full wp-image-809" /></a>Learning keyboard shortcuts helps you improve efficiency and performance in any almost any program. I find this especially true for Photoshop since much of the design process is done with a mouse, it helps to train the other hand to use shortcuts and type in small amounts. In posting this, I hope to reference it myself to memorize and learn these shortcuts, and hopefully others will bookmark and reference this page as well.</p><table
class="data" width="100%" cellspacing="0" cellpadding="0" border="1"><tbody><tr><th>Shortcut / Key Combo</th><th>Result</th><th>Explained</th></tr><tr><td>Alt + Ctrl + A</td><td>Select All</td><td>Slect All Layers in the Document</td></tr><tr><td>Ctrl + Shift + C</td><td>Copy Merged</td><td>Useful for copying a selected area what you see on screen.</td></tr><tr><td>Ctrl + H</td><td>Hide/Show Guidelines</td><td>Useful to Hide Guidelines while working with lot of layer with many guidelines for alignment.</td></tr><tr><td>Ctrl + A + Any arrow key</td><td>Selects present Layer</td><td>makes selection of present selected layer  (except text layer)</td></tr><tr><td>Ctrl + Mouse click on Layer (layer palette)</td><td>Makes Layer Selection</td><td>-</td></tr><tr><td>Ctrl + Scroll Mouse (up/down)</td><td>Moves document left or right</td><td>The shorcut Navigate the document left or right</td></tr><tr><td>Ctrl + Shift + > or <</td><td>Increase Decrease the font size</td><td>Select  text, press Ctrl + Shift + > or < to increase / decrease font size.</td></tr><tr><td>Ctrl + Alt + Scroll Mouse</td><td>Zoom In/Out</td><td>Zoom In/Out</td></tr><tr><td>Double click  Zoom tool</td><td>Zoom to 100%</td><td>Double click on the Zoom tool will zoom document  to 100%.</td></tr><tr><td>Tab</td><td>Toggle Tools Panel</td><td>Press Tab to toggle tools panel</td></tr><tr><td>Shift + Tab</td><td>Show / Hide Palette Windows</td><td>Show / Hide your active Palette Windows</td></tr><tr><td>Caps lock</td><td>Precise cursor</td><td>Caps lock displays tool cursor in precise  mode</td></tr><tr><td>Ctrl + Tab</td><td>Switch between document windows</td><td>Switch between document windows</td></tr><tr><td>Select Text – Ctrl + Enter + Enter + Move arrow  keys</td><td>Change font style</td><td>Easy to select your desired font style from hundreds of fonts available with just arrow keys</td></tr><tr><td>F5</td><td>Show/Hide Brushes palette</td><td>Press F5 to Show/Hide Brushes palette and Press B to activate the palette</td></tr><tr><td>F6</td><td>Show/Hide Color palette</td><td>Show/Hide Color palette</td></tr><tr><td>F7</td><td>Show/Hide Layers palette</td><td>Show/Hide Layers palette</td></tr><tr><td>F8</td><td>Show/Hide Actions palette</td><td>Show/Hide Actions palette</td></tr><tr><td>F12</td><td>Revert</td><td>Revert to Last Saved</td></tr><tr><td>Shift + F5</td><td>Fill</td><td>Opens the Fill Box</td></tr><tr><td>Shift + F6</td><td>Feather Selection</td><td>Feather Selection</td></tr><tr><td>Shift + F7</td><td>Inverse Selection</td><td>Inverse Selection</td></tr><tr><td>B</td><td>Brush / Pencil / Color Replacement Tool</td><td>To Pick Brush / Pencil / Color Replacement Tool</td></tr><tr><td>C</td><td>Crop Tool</td><td>To Pick Crop Tool</td></tr><tr><td>D</td><td>Default Color</td><td>Set Default Foreground/Background (Black/White) Color</td></tr><tr><td>E</td><td>Eraser Tool</td><td>To Pick Eraser Tool</td></tr><tr><td>F</td><td>Cycle Screen Modes</td><td>Cycle Screen Modes upto full screen</td></tr><tr><td>G</td><td>Gradient / Paint Bucket Tool</td><td>To pick Gradient / Paint Bucket Tool</td></tr><tr><td>I</td><td>Eyedropper Tool</td><td>To pick Eyedropper Tool</td></tr><tr><td>L</td><td>Lasso Tool</td><td>To Pick Lasso Tool</td></tr><tr><td>M</td><td>Marquee Tool</td><td>To Pick Marquee Tool</td></tr><tr><td>O</td><td>Dodge / Burn / Sponge Tool</td><td>To pick Dodge / Burn / Sponge Tool (Use Shift + O to toggle between)</td></tr><tr><td>P</td><td>Pen / Freeform Pen Tool</td><td>To pick Pen / Freeform Pen Tool (Use Shift + P to toggle between)</td></tr><tr><td>Q</td><td>Standard / Quick Mask Mode</td><td>To Activate Standard / Quick Mask Mode</td></tr><tr><td>S</td><td>Clone / Pattern Stamp Tool</td><td>To pick Clone / Pattern Stamp Tool (Use Shift + S to toggle between)</td></tr><tr><td>T</td><td>Type/Text Tool</td><td>To Pick Type/Text Tool</td></tr><tr><td>U</td><td>Shapes Tool</td><td>To pick Shapes Tool</td></tr><tr><td>V</td><td>Move Tool</td><td>To pick Move Tool</td></tr><tr><td>W</td><td>Magic Wand Tool</td><td>To Pick Magic Wand Tool</td></tr><tr><td>X</td><td>Switch Colors</td><td>Switch beween Foreground/Background Color</td></tr><tr><td>Ctrl + D</td><td>Deselect</td><td>Deselect your selection on the document</td></tr><tr><td>]</td><td>Increase Brush Size</td><td>Increase Brush Size</td></tr><tr><td>[</td><td>Decrease Brush Size</td><td>Decrease Brush Size</td></tr><tr><td>1 - 0</td><td>Tool Opacity</td><td>Use numbers from 1 - 0 to set opacity</td></tr><tr><td>Hold Space</td><td>Hand Tool</td><td>Hold Space and use mouse with left click to move around the document</td></tr><tr><td>Ctrl + Shift + I</td><td>Inverse Selection</td><td>Selects opposite of your present seleciton</td></tr><tr><td>Alt + Ctrl + D</td><td>Feather Selection</td><td>Feather Selection</td></tr><tr><td>Ctrl + Space + Click</td><td>Zoom In</td><td>Zoom In Document</td></tr><tr><td>Alt + Space + Click</td><td>Zoom Out</td><td>Zoom Out Document</td></tr><tr><td>Shift + A-Z keys</td><td>Toggle Between</td><td>Toogle Between the hidden tools</td></tr><tr><td>Alt + Ctrl + Shift + S</td><td>Save for Web</td><td>Save Document for Web in your desired selected options (JPG, GIF, PNG, etc.)</td></tr><tr><td>Ctrl + T</td><td>Free Transform Tool</td><td>Free Transform Tool</td></tr><tr><td>Alt + Ctrl + T</td><td>Duplicate Free Transform</td><td>Duplicate Free Transform</td></tr><tr><td>Ctrl + Alt + Shift + T</td><td>Duplicate Transform Again</td><td>Duplicate Transform Again</td></tr><tr><td>Alt + Backspace</td><td>Fill Foreground Color</td><td>Fill Foreground Color</td></tr><tr><td>Ctrl + Backspace</td><td>Fill Background Color</td><td>Fill Background Color</td></tr><tr><td>Ctrl + ]</td><td>Bring Forward</td><td>Bring Forward (Selected Layer)</td></tr><tr><td>Ctrl + [</td><td>Send Backward</td><td>Send Backward (Selected Layer)</td></tr><tr><td>Ctrl + Shift + ]</td><td>Bring To Front</td><td>Bring To Front (Selected Layer)</td></tr><tr><td>Ctrl + Shift + [</td><td>Send to Back</td><td>Send to Back (Selected Layer)</td></tr><tr><td>Ctrl + J</td><td>Layer via Copy</td><td>Layer via Copy</td></tr><tr><td>Ctrl + Shift + J</td><td>Layer via Cut</td><td>Layer via Cut</td></tr><tr><td>Ctrl + Shift + N</td><td>New Layer</td><td>Create New Layer</td></tr><tr><td>Ctrl + E</td><td>Merge Layers</td><td>Merge Layers</td></tr><tr><td>Ctrl + Shift + E</td><td>Merge visible</td><td>Merge visible Layers</td></tr><tr><td>Alt + ]</td><td>Next Layer</td><td>Move to Next Layer</td></tr><tr><td>Alt + [</td><td>Previous Layer</td><td>Move to Previous Layer</td></tr><tr><td>Ctrl + W</td><td>Close</td><td>Close Document</td></tr><tr><td>Ctrl + 0</td><td>Fit on Screen</td><td>Fit on Screen</td></tr><tr><td>Alt + Ctrl + 0</td><td>Actual Size</td><td>Actual Size of Document</td></tr></tbody></table><p></p> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/technology/photoshop-shortcuts-pc/feed</wfw:commentRss> <slash:comments>13</slash:comments> </item> </channel> </rss>
