<?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>Martini Lab Blog &#187; Design</title>
	<atom:link href="http://www.martinilab.com/blog/category/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.martinilab.com/blog</link>
	<description>Web design, CSS, scripting, Adobe, tips and other scraps of things that come my way</description>
	<lastBuildDate>Fri, 20 Aug 2010 20:58:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Never start with Photoshop</title>
		<link>http://www.martinilab.com/blog/220/never-start-with-photoshop/</link>
		<comments>http://www.martinilab.com/blog/220/never-start-with-photoshop/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 23:02:51 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[scalability]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=220</guid>
		<description><![CDATA[I was asked recently about my design process in creating websites. I’ve been asked this before in interviews and by peers. My answer is, “Never with Photoshop.” In fact, Photoshop is usually my last step in the process. Even in &#8230; <a href="http://www.martinilab.com/blog/220/never-start-with-photoshop/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I  was asked recently about my design process in creating websites.  I’ve been asked this before in interviews and by peers.  My answer is, “Never with Photoshop.”  In fact, Photoshop is usually my last step in the process.  Even in creating mock-ups, I would never flat out begin with creating a PSD to export for review.  Too often I’ve been in scenarios where the design of a PSD has dictated the functionality of how a website should work.  Chances are the designer who created the document has measured little and drop-shadowed a lot.  The process can cause frustration for the person who has to “interpret” the file into a working web page, especially when there are no notes, do scribbles in the margin, no thought into how all of the elements sit in the DOM (90% of the time it happens all the time).</p>
<p>Concept your design on paper is the single most important step to begin with.  Draw it out.  Scratch what you don’t like.  Redraw it.  Think ahead about the models and controls while you do this too.</p>
<p>This page is a good example.  Even something simple like creating a tool to reconcile records across to tables needs a plan of action.</p>
<h3>Step 1</h3>
<p><a href="http://www.flickr.com/photos/amboy00/4908478986/in/photostream/"><img alt="sketch of page when designing" src="http://farm5.static.flickr.com/4118/4908478986_cd1362d6e5.jpg" title="Sketch" class="alignnone" width="374" height="500" /></a></p>
<h3>Step 2</h3>
<p><a href="http://www.flickr.com/photos/amboy00/4907884949/in/photostream/"><img alt="The final product" src="http://farm5.static.flickr.com/4081/4907884949_71b72d5798.jpg" title="final" class="alignnone" width="500" height="374" /></a></p>
<h3>Step 3</h3>
<p>Profit!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/220/never-start-with-photoshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What’s up with that?</title>
		<link>http://www.martinilab.com/blog/199/whats-up-with-that/</link>
		<comments>http://www.martinilab.com/blog/199/whats-up-with-that/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 18:39:55 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=199</guid>
		<description><![CDATA[file under: too long to fit on twitter. On the left-hand side of Google’s search results page. There are two hidden search option sections. When you click “More” it slides down and the options fade in at the same time. &#8230; <a href="http://www.martinilab.com/blog/199/whats-up-with-that/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>file under: too long to fit on <a href="http://twitter.com/amboy00">twitter</a>.</em></p>
<p>On the left-hand side of Google’s search results page. There are two hidden search option sections.  When you click “More” it slides down and the options fade in at the same time. Just below it, when you click on “Show more tools” it slides down first, <strong>then</strong> its related options fade in.</p>
<p>Likewise, when you toggle them back to their original states, “More” will slide up while the options fade out, but “Show search tools” doesn’t slide up until <strong>after</strong> its related options fade out.</p>
<p>What’s up with that?</p>
<p>#nobodycares</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/199/whats-up-with-that/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Zeus Comics… again</title>
		<link>http://www.martinilab.com/blog/193/introducing-zeus-comics-again/</link>
		<comments>http://www.martinilab.com/blog/193/introducing-zeus-comics-again/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 13:44:07 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=193</guid>
		<description><![CDATA[Be it the original design was getting stale, worn out its “newness” factor, the form of the site needed to keep up with the changes in the industry, a response to competition, since we’re switching ISPs anyway, or I simply &#8230; <a href="http://www.martinilab.com/blog/193/introducing-zeus-comics-again/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Be it the original design was getting stale, worn out its “newness” factor, the form of the site needed to keep up with the changes in the industry, a response to competition, since we’re switching ISPs anyway, or I simply learned a lot more since its last iteration, Zeus needed an update.</p>
<p>Zeus’ flagship feature was its checklist.  The checklist was an itemized form of everything that was shipping that week.  Customers could fill out the form and notify the store which items they wanted to pick up on Wednesday (when comics book typically arrive).  And as far as I could tell, Zeus was the first store to offer this feature.  I’ve seen some crop up here that there, but they were largely static, cumbersome to use, and were constructed out of tables.</p>
<p>Three things: customers noted that it wasn’t the greatest for mobile devices, and a digital comic publisher had a mobile app that customers were using in lieu  of our checklist, and most importantly customers couldn’t tell which comic book they wanted by name alone.  Often they would have to go to the store and pick up other titles they missed.</p>
<h3>We’ll do it live!</h3>
<p>While I’m already building a long list of bugs (bandwidth being a whopper), I certainly like the results so far.  It’s already in my opinion a better solution than a the iPhone app offered (which wasn’t even usable on iOS4 for several weeks) and future updated to the web app will hopefully offer customers an optimal process in shopping with Zeus Comics.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/193/introducing-zeus-comics-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let Them Die</title>
		<link>http://www.martinilab.com/blog/167/let-them-die/</link>
		<comments>http://www.martinilab.com/blog/167/let-them-die/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 18:19:48 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=167</guid>
		<description><![CDATA[This month’s edition of A List Apart covers how to manage multiple browser vendors and their varying support for html5 and css3 1. We’re all aware of the different uses of border-radius in both FireFox and Webkit. And being able &#8230; <a href="http://www.martinilab.com/blog/167/let-them-die/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This month’s edition of A List Apart covers how to manage multiple browser vendors and their varying support for html5 and css3 <a href="#links"><sup>1</sup></a>.  We’re all aware of the different uses of <code>border-radius</code> in both FireFox and Webkit.  And being able to not fork the code in making rounded corners by simply writing standard css3 is tempting.  In fact, it’s ideal.  Having it managed with javascript is actually very clever, and… cool!</p>
<p>But I would propose something different entirely.  Instead of using a js library to help browsers properly render a soundly constructed html5/css5 webpage, short of making sure it doesn’t look like “total ass” on IE, just let the page render as it lay.</p>
<p>By now, web designers are largely aware of the rendering quirks of various browsers.  Little things like not adding margins to floating divs for IE’s sake, or not applying –webkit gradients to divs that contain text fields, are a part of mental mine field map that goes into our work.</p>
<p>Using a javascript library to get around this isn’t the answer.  Remember that script that lets IE6 properly render PNG transparency?  It might have been relevant to a couple of years ago when there were still a vast majority of users that used IE6, but most web designers have abandoned even trying to support the browser, much less trying to make every pixel line up properly or make every image look decent.  At some point (if our bosses let us), we move on.  </p>
<p>Sadly, we moved onto other scripts that do what html5 is supposed to do already.</p>
<p>Here’s my advice.  Write your site to work just fine without any javascript (or css for that matter) needed.  If you can still use the site, you’re good to go.  Using ajax history to browse back and forth with the browser chrome?  Make sure it works without javascript and move on.  If you’ve got some killer CSS mojo for your site, just write it.  Write that widget that does that thing with the stuff, but to say that we have to cover every contingency is unreasonable.  </p>
<p>When did we go from saying “to hell with bad browsers” to using libraries to keep these browsers on “the same page?”</p>
<p>Older browsers won’t go away (I still see Netscape occasionally show up on Google Analytics), but the support we give them can.  </p>
<p>I like to look at these barbaric browsers like the Klingons in Star Trek XI.  Their survival was in jeopardy and Kirk was having none of it.  Eventually, he came around and now we’re stuck with the Klingons and their foreheads forever.</p>
<p>Don’t let this happen to bad browsers.  Let them die.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/Swvf3w6hcY4&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Swvf3w6hcY4&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><a name="links">1. Links</a></p>
<ul>
<li><a href="http://www.alistapart.com/articles/stop-forking-with-css3/">Stop Forking With CSS3</a></li>
<li><a href="http://www.alistapart.com/articles/taking-advantage-of-html5-and-css3-with-modernizr/">Taking Advantage of HTML5 and CSS3 with Modernizr</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/167/let-them-die/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing thevariants.com</title>
		<link>http://www.martinilab.com/blog/155/introducing-thevariantscom/</link>
		<comments>http://www.martinilab.com/blog/155/introducing-thevariantscom/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 22:58:17 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=155</guid>
		<description><![CDATA[The Variants is a new web series sitcom about the crew of a local comic shop. So far, four promos have been produced and released in time for SDCC 2009 and Episode one is scheduled for release. Each episode (or &#8230; <a href="http://www.martinilab.com/blog/155/introducing-thevariantscom/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The Variants is a new web series sitcom about the crew of a local comic shop.  So far, four promos have been produced and released in time for SDCC 2009 and Episode one is scheduled for release.  Each episode (or is it webisode) runs about ten minutes.</p>
<p>Putting this together was a lot of fun.  With internet video content rising well beyond YouTube, I had many examples of what people expect from a media web site.  Plus, I got to work in a little bit of html5 semantics.</p>
<p>Go watch <a href="http://www.thevariants.com">The Variants</a> promos and laugh, laugh and laugh.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/155/introducing-thevariantscom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing scribbr.com</title>
		<link>http://www.martinilab.com/blog/149/introducing-scribbrcom/</link>
		<comments>http://www.martinilab.com/blog/149/introducing-scribbrcom/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 22:51:26 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=149</guid>
		<description><![CDATA[Scribbr is a tiny web app for drawing and posting to twitter. With jQuery, the user can control the color, size, opacity of the cursor to draw on the canvas element 320 x 320 in size. Last summer, I had &#8230; <a href="http://www.martinilab.com/blog/149/introducing-scribbrcom/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://scribbr.com">Scribbr</a> is a tiny web app for drawing and posting to twitter.   With jQuery, the user can control the color, size, opacity of the cursor to draw on the <code>canvas</code> element 320 x 320 in size.</p>
<p>Last summer, I had the opportunity to work with Eisner Award winning cartoonist Scott Kurtz of <a href="http://www.pvponline.com">PVP</a>. During one conversation we had, he came up with a punch-line to what we were talking about.  I don’t remember what the subject was, but the punch-line involved a mock editorial cartoon.  He grabbed a 2″ x 2″ sticky note pad and drew the cartoon.  We had a laugh.</p>
<p>This would never happen online.  At least, not in any convenient, simple, method that I was aware of.</p>
<p>Right now, it’s very crude.  The controls are, admittedly, non-intuitive. There is no ‘Undo’ other than clearing the canvas and starting over. It doesn’t support older browsers either.</p>
<p>I’m actually quite okay with that last part. This site was immensely fun to build. Getting it to work on IE6 would have taken away from that.  Right now, I know that it works on FireFox 3.0, Safari 4.0b (or WebKit nightly build), and Google Chrome 2.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/149/introducing-scribbrcom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zeus Comics redesign</title>
		<link>http://www.martinilab.com/blog/133/zeus-comics-redesign/</link>
		<comments>http://www.martinilab.com/blog/133/zeus-comics-redesign/#comments</comments>
		<pubDate>Fri, 22 May 2009 12:42:22 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=133</guid>
		<description><![CDATA[If for no other reason than finally consolidating the past five years of css style changes into some semblance of organization, this redesign was a long time coming. Zeus Comics and Collectibles is an award-winning comic book retail store in &#8230; <a href="http://www.martinilab.com/blog/133/zeus-comics-redesign/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If for no other reason than finally consolidating the past five years of css style changes into some semblance of organization, this redesign was a long time coming.  </p>
<p><a href="http://www.zeuscomics.com">Zeus Comics and Collectibles</a> is an award-winning comic book retail store in Dallas, Texas. For almost nine years, Zeus has been serving the needs of the comic book reading community in the DFW area in the only manner one can expect from a locally gay-owned business – fabulously!<br />
<span id="more-133"></span><br />
Since its last redesign, when Zeus won the <a href="http://www.comic-con.org/cci/cci_eisners_spirit_06zeuscomics.shtml">Will Eisner Spirit of Comics Retailing Award</a> in 2006, design trends evolved, and how we organize and display our code has matured. Zeus went through many attempts at integrating its point-of-sale system with an ecommerce solution.  I’m embarrassed to admit, its first version, not having any experience in ecommerce (how hard could it be?) used FileMaker Pro and Lasso. Looking back, I’m stunned by some on my coding and design decisions. Some of which locked the site into arcane structures from which are not easily broken. And some still exist.</p>
<p>The old method for adding something to the site was simple—make a new folder and add some new tables and call it good.  Want a forum? Install Aterr. Want a checklist? Add a new CodeIgniter folder. After all, what’s one more, right?  After a while, we ended up with many little systems and no way to support them all.</p>
<p>The site’s design needed consistency from its previous version as well. Too dramatic a departure and it loses its branding. We weren’t looking for a fresh start, just a face lift (with enough skin for more adjusting later).</p>
<p>Our approach to ecommerce was simple: always be closing.   One of the lessons learned from out previous cart solution was the more steps a customer has to take to complete an order, the more likely we’d lose the sale.  When you go into a retail store to buy a comic, you don’t expect to be a member of that shop.  When was the last time you walked up to a counter to pay for your goods to have the clerk ask for you username and password. I don’t have a user name. I just want to buy this book.</p>
<p>This was how our previous cart worked.  And I’ll say this first, after trying out X-cart, Zen Cart, Squirrel Cart and later Magento Commerce, Shop Script was the only solution with the simplest way for us to control data from our point-of-sale source. After adding all the items to the cart, the user would have to create an account, add records to the address book for both shipping and billing, choose those records and add them to the order, and then they could finalize their purchase.</p>
<p>In the current system, we’ve taken out the need for membership.  We don’t need it.  We don’t really want it.  We certainly don’t want to support it, if a customer forgets their password.  Instead, customers get a tracking key upon return from Paypal.  We don’t want your credit card info either.</p>
<p>In the next few weeks, I hope to have a downloadable version of the ecommerce solution, so stay tuned.</p>
<p>Is zeuscomics.com all done now? Hardly. Out of the gate, I’m already tracking new errors plus some old ones that will be address by the next release. Fortunately, one of the design/coding goals was to be able to change and grow the site as needed.  Stay tuned for that too.</p>
<p><a href="http://www.zeuscomics.com">http://www.zeuscomics.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/133/zeus-comics-redesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YouTube’s H.264 turnaround time is the new dial up</title>
		<link>http://www.martinilab.com/blog/128/youtube-h264-turnaround-time/</link>
		<comments>http://www.martinilab.com/blog/128/youtube-h264-turnaround-time/#comments</comments>
		<pubDate>Thu, 21 May 2009 16:40:15 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=128</guid>
		<description><![CDATA[Just how long does it take for a YouTube video to become available on the YouTube iPhone app? Seriously, if YouTube accepts .wmv, .avi, .mkv, .mov, .mpeg, .mp4, .flv, .ogg, 3gp and outputs to multiple .flv, mp4, 3gp… OMG, why &#8230; <a href="http://www.martinilab.com/blog/128/youtube-h264-turnaround-time/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just how long does it take for a YouTube video to become available on the YouTube iPhone app?</p>
<p>Seriously, if YouTube accepts .wmv, .avi, .mkv, .mov, .mpeg, .mp4, .flv, .ogg, 3gp and outputs to multiple .flv, mp4, 3gp… OMG, why then is the link I just tapped not available?</p>
<p>I understand that once uploaded, videos take time to convert for display. Having uploaded some from my own iMovie library, waiting for YouTube to do its magic without a progress bar is torture.  But once it’s done and properly playing on the website, the video still has to become available for HD (if available), mobile, etc.</p>
<p>As we become more connected on more networks on new devices, our content experience should become more homogeneous. Websites should get closer to looking the same on our desktop computers as they do our mobile devices. Instead, because of mobile phones and netbooks (more specifically, their wireless connectivity) web designers, who once enjoyed building for higher display resolutions and bigger bandwidth, find themselves thrown back into building sites that are “dial-up” friendly.  It’s a whole new browser war sans Netscape Navigator.</p>
<p>Which brings me back to YouTube on the iPhone. Video codec H.264, briefly put, is designed for both high-def and small bandwidth playback.  Since YouTube offers multiple versions of the same video, it has to take the original video upload and convert it several times. And since the only way to view YouTube on Apple TV or the iPhone is with h.264, YouTube needs to make additional conversions/transcodings.</p>
<p>In the end, content for the web isn’t just for the browser.  It includes phones, game consoles, dvr (TiVo), and any future devices we don’t yet know we need.  And all of them need the same content in their own specific formats.</p>
<p>All of this means that the next time I see something along the lines of “@amboy00: too funny! http://tinyurl.com/pqhugm,” I’ll probably have to wait until I get back to my desk to see the funny.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/128/youtube-h264-turnaround-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tackling Safari’s slow gif “feature” with jQuery</title>
		<link>http://www.martinilab.com/blog/75/tackling-safaris-slow-gif-feature-with-jquery/</link>
		<comments>http://www.martinilab.com/blog/75/tackling-safaris-slow-gif-feature-with-jquery/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 23:19:36 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=75</guid>
		<description><![CDATA[Safari’s WebKit has a funny behavior of displaying animated gif files at a lower frame rate than Firefox. From what I can tell, WebKit (including Google Chrome) caps the animated gif frame rates at 10fps. While it may be faster &#8230; <a href="http://www.martinilab.com/blog/75/tackling-safaris-slow-gif-feature-with-jquery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Safari’s WebKit has a funny behavior of displaying animated gif files at a lower frame rate than Firefox. From what I can tell, WebKit (including Google Chrome) caps the animated gif frame rates at 10fps. While it may be faster than some IE6 browsers, it’s not exactly helpful for those files with higher frame rates.</p>
<p>For example, the popular ajax loader file that hails from Apple’s own <a href="http://developer.apple.com/documentation/userexperience/Conceptual/AppleHIGuidelines/XHIGControls/XHIGControls.html">asynchronous progress indicator</a>, has 12 points and loops around once a second.  Well, for one thing, 12fps is really choppy, but it already plays slower on Apple’s nifty browser.</p>
<h2>jQuery to the rescue</h2>
<p>Did you know that jQuery can control css background positions? Are you thinking what I’m thinking?<br />
<span id="more-75"></span></p>
<h2>But first, back to drawing board</h2>
<p>So the first part was to break up the animated gif frames and spread them out across a very long canvas. Since Photoshop no longer opens animated gif files (unless you own ImageReady somewhere), Fireworks can open the file. Use Fireworks to export the frames to individual files and THEN Photoshop can import all the files as a stack.</p>
<p>File <code>&lt;Scripts&gt;</code> Load Files into Stack…</p>
<p>For our ajax loader, expand all the layers next to each other and then save it out to its own gif.  The file size won’t be that difference in fact.</p>
<h2>Now let’s get back to jQuery</h2>
<p>In our html, just set the div with a width and height to match your gif to prevent clipping and let the script do the rest.</p>
<pre lang="javascript" line="1">

$(document).ready(function(){
	var bgimage = 'url(images/ajax-loader-long.gif)';
	var frames = 24;
	var mpf = parseInt(1000/frames)  // how many miliseconds in each frame
	var currentFrame = 0;
	var offset = 0;

	$('.animate').css('background-image', bgimage);

	function animate() {
		offset = currentFrame * 64;
		$('.animate').css('background-position', '-' + offset + 'px 0px');
		currentFrame = (currentFrame == frames) ? 1 : currentFrame + 1;
	}

	setInterval(animate, mpf);
});
</pre>
<p>Now we have a script that will snap the position of the background over each “frame” at the correct frame rate. Actually, the frame rate is not divisible by 1000, but it’s close and it’s not like you could tell.</p>
<p>The only problem with this script is that it’s constantly running. If you look at the page in Firebug, your going to see the code whipping around with new values all the time. Annoying! Also, chances are your page isn’t going to need some animation playing constantly. Ajax loaders are intermittently called when a simple action is called as a… asynchronous progress indicator! Who knew.</p>
<p>So we’re going to put in a cancel command to this script: <strong>clearTimeout</strong>.</p>
<pre lang="javascript" line="1">

$(document).ready(function(){
	var bgimage = 'url(images/ajax-loader-long.gif)';
	var frames = 24;
	var mpf = parseInt(1000/frames)  // how many miliseconds in each frame
	var currentFrame = 0;
	var offset = 0;
	var runAnimate = 0;

	$('.animate').css('background-image', bgimage);

	function animate() {
		offset = currentFrame * 64;
		$('.animate').css('background-position', '-' + offset + 'px 0px');
		currentFrame = (currentFrame == frames) ? 1 : currentFrame + 1;
	}

	runAnimate = setInterval(animate, mpf);

	$('.animate').toggle(
		function () {
			clearTimeout(runAnimate);
		},
		function () {
			runAnimate = setInterval(animate, mpf);
		}
	);
});
</pre>
<p>Add in a toggle so show how to turn on and off the animation and were done.</p>
<p>It even works on ie6!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/75/tackling-safaris-slow-gif-feature-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Triptych Slideshow</title>
		<link>http://www.martinilab.com/blog/54/jquery-triptych-slide-show/</link>
		<comments>http://www.martinilab.com/blog/54/jquery-triptych-slide-show/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 23:58:04 +0000</pubDate>
		<dc:creator>Chris Williams</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.martinilab.com/blog/?p=54</guid>
		<description><![CDATA[My previous how-to showed a new way to look at the slider function featured at the Apple.com/mac site. This one goes to Apple once again and their bucket ads shown in the iTunes Music Store. The buckets are what I’m &#8230; <a href="http://www.martinilab.com/blog/54/jquery-triptych-slide-show/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My previous how-to showed a new way to look at the slider function featured at the Apple.com/mac site. This one goes to Apple once again and their bucket ads shown in the iTunes Music Store. The buckets are what I’m calling them. They are the three spots at the top of the music store which rotate graphics like the slideshow functions of many galleries. The difference is that these three take turns.</p>
<p>I was able to replicate this function using Scriptaculous on our beloved <a href="http://www.zeuscomics.com">comic shop</a> website. But after a few years of constantly adding duct tape to the site, it was time to move everything to a single framework. And that mean making this triptych banner script run on jQuery.  Hopefully without a lot of html recoding.<br />
<span id="more-54"></span></p>
<h2>Make your list</h2>
<p>For the html, set your divs with a ‘slide’ class and a position class.  I guess you can do this in an unordered list, but whatever.</p>
<pre lang="html4strict" line="1">
&lt;div class="slide pos1"&gt;&lt;a href="link1"&gt;&lt;img src=""&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="slide pos2"&gt;&lt;a href="link2"&gt;&lt;img src=""&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="slide pos3"&gt;&lt;a href="link3"&gt;&lt;img src=""&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class="slide pos1"&gt;&lt;a href="link4"&gt;&lt;img src=""&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="slide pos2"&gt;&lt;a href="link5"&gt;&lt;img src=""&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="slide pos3"&gt;&lt;a href="link6"&gt;&lt;img src=""&gt;&lt;/a&gt;&lt;/div&gt;
</pre>
<h2>Set your positions</h2>
<p>The easiest solution is to make the position classes absolute.</p>
<pre lang="css" line="1">

.pos1 {
    position: absolute;
    left: 0px;
    top: 0px;
}

.pos2 {
    position: absolute;
    left: 210px;
    top: 0px;
}

.pos3 {
    position: absolute;
    left: 420px;
    top: 0px;
}
</pre>
<h2>Good news, everyone! This script doesn’t need a plug-in.</h2>
<p>I always start my script codes with an apology, so why stop now.  I’m sorry.</p>
<p>The first part makes sure that the banners appear in the order that their written in html.  Because of the absolute positioning, however, they stack on top of each other and the last will be on top.</p>
<p>Also, I didn’t like how <code>i</code> in jQuery’s <code>each()</code> function started at 1 and not 0, but that’s just me.</p>
<pre lang="javascript" line="1">

$(document).ready(function(){
    var slideCount = $('.slide').size() - 1;
    $('.slide').each(function(i) {
        $(this).css('z-index', slideCount - i);
    });

    var currentSlide = slideCount;
    var zIndex = 0;

    function imgRotate() {
        $('.slide').each(function(i) {
            if($(this).css('z-index') == currentSlide)
            {
                $(this).fadeOut('slow', function() {
                    $(this).css('z-index', (0));
                    $(this).show();
                });
            }
            else
            {
                zIndex = $(this).css('z-index');
                zIndex = parseInt(zIndex) + parseInt(1);
                $(this).css('z-index', (zIndex));
            }
        });
    }

    setInterval(imgRotate, 4000);

});
</pre>
<p>This script should be able to make with any number of banners and any number of sets.  This example just used a set of three, but your can make it a set of two, or four, or ten!  Just make the list divisible by the set and fix your positions of course.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martinilab.com/blog/54/jquery-triptych-slide-show/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
