<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title><![CDATA[The Foundry from Sparkbox]]></title>
    <link>http://seesparkbox.com/foundry</link>
    <description>Where Sparkbox shares articles, tutorials, pictures and more.</description>
    <dc:language>en</dc:language>
    <dc:creator>info@heysparkbox.com</dc:creator>
    <dc:rights>Copyright 2012</dc:rights>
    <dc:date>2012-05-14T10:00:55+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
    

    <item>
      <title><![CDATA[Validating the jQuery UI Datepicker]]></title>
      <link>http://seesparkbox.com/foundry/validating_the_jquery_ui_datepicker</link>
      <guid>http://seesparkbox.com/foundry/validating_the_jquery_ui_datepicker#When:10:00:55Z</guid>
              <description><![CDATA[The jQuery UI datepicker and client-side form validation often don't play well together. Rob Tarr offers workarounds on how you can make peace between them.<p>
	Nearly every website or web app we build at Sparkbox includes some sort of form. Often, dates are required, and we'll rely on&nbsp;the excellent&nbsp;<a href="http://jqueryui.com/demos/datepicker/">jQuery UI datepicker</a>. In order to create nice, user-friendly forms, good client-side validation is also usually involved.</p>
<p>
	The problem I've found with this combination is that the datepicker doesn't generally trigger validation when you change the date. This can be a problem if a user accidentally types an invalid date in a date field, and then they use the datepicker to correct it. Validation messages and styling will still show the date as invalid. No good &ndash; confused user.</p>
<p>
	Recently, I've been using either&nbsp;<a href="https://github.com/ryanseddon">Ryan Seddon's</a>&nbsp;well done&nbsp;<a href="https://github.com/ryanseddon/H5F">H5F Library</a> or the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery Validate plugin</a> from <a href="https://twitter.com/#!/bassistance/">Bassistance</a>&nbsp;to handle form validation. Below are my solutions to handling the issue with the datepicker using these two validation libraries:</p>
<h2>
	H5F</h2>
<p>
	<a href="http://jsfiddle.net/gh/gist/jquery/1.7.2/2628275/">See working example</a> &#123;exp:gist:fetch id='2628275' file='js'&#125;</p>
<p>
	&nbsp;</p>
<h2>
	jQuery Validate plugin</h2>
<p>
	<a href="http://jsfiddle.net/gh/gist/jquery/1.7.2/2628089/">See working example</a> &#123;exp:gist:fetch id='2628089' file='js'&#125;</p>
<p>
	If you would like to see solutions for other validation libraries let me know, I'll see what I can do. Or, let me know what your solution looks like. If you have suggestions, definitely let me know in the comments or on twitter.</p>
]]></description>
            <dc:subject><![CDATA[Featured, A well-crafted site adds value., JavaScript,]]></dc:subject>
      <dc:date>2012-05-14T10:00:55+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Build Responsively Workshop Coming To Columbus, OH]]></title>
      <link>http://seesparkbox.com/foundry/build_responsively_workshop_coming_to_columbus_oh</link>
      <guid>http://seesparkbox.com/foundry/build_responsively_workshop_coming_to_columbus_oh#When:10:00:35Z</guid>
              <description><![CDATA[Announcing our second responsive workshop, slated for July 9-10 in beautiful Columbus, Ohio.<p>
	With one under our belts and hopefully many more to come, Sparkbox is pleased to announce that our second <a href="http://buildresponsively.com/">Build Responsively Workshop</a> is on the calendar. This responsive train will be rolling into Columbus, Ohio July 9-10. That's right, folks, we're extending the workshop to two days.</p>
<p>
	While our first workshop in Cincinnati was a one-day event, we've extended the workshop to include more RWD goodness that just couldn't be fit into a single day. We will continue to cover the basics, planning, design, and responsive HTML/CSS. However, in Columbus, we'll be adding some emerging responsive patterns, responsive JavaScript, and the issue of responsive retrofits. <a href="http://buildresponsively.com/detail/columbus">More details</a>.</p>
<p>
	<a href="http://buildresponsively.eventbrite.com/">Tickets</a> go on sale May 21. Due to the one-on-one nature of the workshop, we're keeping it small at 80 seats, and we expect them to go fast. Mark your calendars today, kids.</p>
<p>
	We still have a few open sponsorship slots available as well. If you're interested, check out our <a href="http://buildresponsively.com/pdf/brworkshop-sponsorship-2012.pdf">sponsorship packet</a> and hit us up.</p>
]]></description>
            <dc:subject><![CDATA[Featured, Education keeps us current., Meet them where they are.,]]></dc:subject>
      <dc:date>2012-05-09T10:00:35+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Breakpoint Checking in Javascript with CSS User Values]]></title>
      <link>http://seesparkbox.com/foundry/breakpoint_checking_in_javascript_with_css_user_values</link>
      <guid>http://seesparkbox.com/foundry/breakpoint_checking_in_javascript_with_css_user_values#When:10:00:14Z</guid>
              <description><![CDATA[With a fire lit under us from one Jeremy Keith, we present a way to check for media query breakpoints in JavaScript without using matchMedia or onResize events – including the passing of user-defined strings. Keen!<p>
	Tuesday morning, <a href="http://twitter.com/adactio" title="Jeremy on Twitter">Jeremy Keith</a> posted a <a href="http://adactio.com/journal/5414/" title="Adactio">very interesting problem</a> on his blog regarding conditionally loaded content. Long story short, he wanted the ability to test for a user-defined declaration in CSS with JavaScript without employing a resize event or use of matchMedia.</p>
<p>
	Paul Hayes came up with <a href="http://www.paulrhayes.com/2011-11/use-css-transitions-to-link-media-queries-and-javascript/" title="Use CSS transitions to link Media Queries and Javascript">a lovely solution</a>, but it needs to check for a specific media query. In this case, your media queries need to be maintained in two places. If you decide to change a media query in your CSS, then you need to also change it in your JavaScript.</p>
<p>
	In a perfect world, CSS and JavaScript separation (even in the case of media query detection) should be maintained.</p>
<p>
	<a href="http://seesparkbox.com/about/rob_tarr/">Rob Tarr</a> and I worked to develop our own solution. First off, which CSS property could be used to test this theory? The property needs to accept any value thrown at it. The <code>content</code> property seemed like a great fit. Why not test the value of <code>content</code> from inside a throwaway <code>:before</code> or <code>:after</code> pseudo-element?</p>
<p>
	Things are going well so far, but we still needed this to fire on an event of some kind. Paul Hayes&rsquo; previously mentioned solution had the answer: transition events!&nbsp;</p>
<p>
	We created a mashup of these two ideas by checking for <code>content</code> on transition instead of media query size. We used &ldquo;small,&rdquo; &ldquo;medium,&rdquo; and &ldquo;large&rdquo; as the <code>content</code> string to give us a loose coupling between the triggered media query and our goal in JavaScript. With this solution, we can claim that multiple media query breakpoints should still be considered &ldquo;medium,&rdquo; which is something that could come in very handy.&nbsp;We also found that we needed to attach the transition to the parent of the pseudo element because the <code>transitionend</code> event never fired when transitioning in elements with a <code>content</code> property defined.</p>
<p>
	Here&rsquo;s the <a href="https://gist.github.com/2482049" title="Gist!">gist</a>, so you can see it for yourself. Also, play around on this <a href="http://jsfiddle.net/Vqs9n/5/" title="JSFiddle playground">jsFiddle</a> with your console open. The irony of this solution is that it actually has better <a href="https://developer.mozilla.org/en/CSS/CSS_transitions#Browser_compatibility" title="MDN CSS transitions">browser support</a> than <a href="https://developer.mozilla.org/en/DOM/window.matchMedia#Browser_compatibility," title="MDN window.matchMedia">matchMedia</a>! The only caveat is that IE 9 falls between the cracks. IE 9 supports media queries, but it does not support the <code>transitionend</code> event, which this solution depends on. So, IE 9 will need a fallback.</p>
<h2>
	Wrapup</h2>
<p>
	Is this hacky? Yes.</p>
<p>
	Keep in mind, it's just a proof of concept, but we think it has some legs.&nbsp;We also made a simple demo for you <a href="http://seesparkbox.com/demos/css-content-check/index.html">here</a>. Enjoy.</p>
<h2>
	The gist in its entirety:</h2>
<p>
	&#123;exp:gist:fetch id='2482049'&#125;</p>
]]></description>
            <dc:subject><![CDATA[Featured, Being well-built yields longevity., CSS, JavaScript,]]></dc:subject>
      <dc:date>2012-04-25T10:00:14+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Bringing Some #bdconf Back To #dayton]]></title>
      <link>http://seesparkbox.com/foundry/bringing_some_bdconf_back_to_dayton</link>
      <guid>http://seesparkbox.com/foundry/bringing_some_bdconf_back_to_dayton#When:14:00:36Z</guid>
              <description><![CDATA[Ben reflects on takeaways from Orlando's 2012 Breaking Development conference.<p>
	I&rsquo;m just back from Orlando where I spent three days in the company of some very smart people. People who think about the web in the same way that we do at Sparkbox. Following are my thoughts on the week.</p>
<p>
	In my opinion, <a href="https://twitter.com/#!/karenmcgrane">Karen McGrane</a> stole the show. Don&rsquo;t get me wrong &ndash; <a href="https://twitter.com/#!/grigs">Jason</a> killed it talking about the smart TV, and <a href="https://twitter.com/#!/beep">Ethan</a> was as eloquent as I&rsquo;ve ever seen him. <a href="https://twitter.com/#!/globalmoxie">Josh</a> is always engaging, and <a href="https://twitter.com/#!/stephanierieger">Stephanie</a> blows my mind anytime she speaks. Somehow, though, Karen managed to stand out in this amazing line-up of presenters.</p>
<p>
	<a href="http://seesparkbox.com/foundry/think_responsively">We love to think responsively.</a>&nbsp;That doesn&rsquo;t mean we always follow the definition of <a href="https://twitter.com/#!/search/%23rwd">#rwd</a> in the purest sense of the term, but we embrace the intent of responsive web design. We strive to create excellent content experiences no matter the device on which they are viewed. What Karen so beautifully described carried this concept beyond design and development into content strategy and content management system integration.&nbsp;While this certainly wasn&rsquo;t completely new to me, Karen was able to present the topic in a way that made it feel more tangible &ndash; more within reach &ndash; than I&rsquo;ve heard it before. The basic premise is that we must consider a more modular approach to content which will allow it to span channels, devices, and contexts. Thinking of our content management systems as APIs opens up a wealth of possibility for the portability of content. After all, content is where real value lies.&nbsp;</p>
<p>
	You can read her writing on the same topic in <a href="http://karenmcgrane.com/2011/12/14/mobile-content-strategy/">this article</a>. It's a <em>must read</em>.</p>
<p>
	Beyond this, I had the opportunity to talk shop with some of the individuals I look up to most in our industry. I had a chance to witness the real community that we&rsquo;re a part of. It&rsquo;s a community that truly cares about users, and it is idealistic almost to a fault (which <em>I love</em>). It&rsquo;s a community that carefully considers new ideas and relentlessly challenges old ones. <a href="https://twitter.com/#!/bdconf">@bdconf</a> is not your average conference. Somehow, the organizers are able to bring the brightest minds on mobile web together to foster incredible conversation. It was inspiring; but more importantly, it was encouraging.</p>
<p>
	There, in Orlando, I sat around a fire among smart, <em>smart</em> people until the early hours of the morning, and we discussed a whole new breed of challenges. There is no denying, we are entering uncharted territory, but it is good to know that we're not alone. I&rsquo;m even more grateful for the hours with my peers over dinner and drinks each evening than for the amazing presentations.&nbsp;</p>
<p>
	Thanks to the Breaking Development team for another fantastic conference. You guys rock.</p>
]]></description>
            <dc:subject><![CDATA[Education keeps us current.,]]></dc:subject>
      <dc:date>2012-04-24T14:00:36+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Recent Launch: Stry.us Website]]></title>
      <link>http://seesparkbox.com/foundry/recent_launch_stry_us_website</link>
      <guid>http://seesparkbox.com/foundry/recent_launch_stry_us_website#When:09:59:59Z</guid>
              <description><![CDATA[We're proud to announce the recent launch of Stry.us. An unconventionally designed news site for an unconventional news organization.<p>
	Working with <a href="http://www.stry.us/">Stry</a> on a ground-up brand and website overhaul was one of those rare occasions where the client hands over near complete creative control. The direction from Stry founder, <a href="https://twitter.com/#!/danoshinsky">Dan Oshinsky</a>, was pretty much, &quot;Make the most beautiful news website ever made.&quot; When you get that sort of creative freedom on day one, you know you're in for a good time.</p>
<p>
	As we learned more about Stry and Dan, we found that the uncoventionally free design direction was in line with the uncoventional organization as a whole. As they like to say of themselves,</p>
<blockquote>
	<p>
		We're Stry, a new type of news organization. We don't care much about big headlines or news of the day, and we're not easily distracted. We're just a band of storytellers in pursuit of great storytelling. We tell stories about the issues that affect our lives.</p>
</blockquote>
<p>
	Stop by <a href="http://www.stry.us">Stry.us</a> for a look around. Be sure to set aside some time, however, because even if the beautiful, responsive design eventually loses your attention, the rich longform articles will keep you there for hours.</p>
<p>
	<a class="the-link" href="http://www.stry.us">Visit the Stry.us Website</a></p>
]]></description>
            <dc:subject><![CDATA[Featured,]]></dc:subject>
      <dc:date>2012-04-23T09:59:59+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Typography Tools for the Web]]></title>
      <link>http://seesparkbox.com/foundry/typography_tools_for_the_web</link>
      <guid>http://seesparkbox.com/foundry/typography_tools_for_the_web#When:10:39:09Z</guid>
              <description><![CDATA[Plugins, bookmarklets, and jQuery – oh my. Check out Jeremy's roundup of helpful typography tools designers and developers can both love.<p>
	With the explosion of typography on the web, web designers now have a myriad of font choices at their fingertips. Because of this, many tools have been created to aid with making type on the web beautiful and easy. These tools create an interesting intersect between designer and developer, as knowledge of these tools is important for both parties. Here are a few of my favorites:</p>
<h2>
	What Font</h2>
<p>
	This <a href="http://chengyinliu.com/whatfont.html">handy little bookmarklet</a> allows you to quickly identify fonts used on a webpage without having to go through the Webkit Inspector or Firebug. Simply roll over a section of type on a webpage, and it displays the font name. Click on the section of type, and it displays the font families listed, type size, line height, color, a specimen, and Twitter link.</p>
<p>
	<img alt="What Font bookmarklet in action." src="/uploads/article_uploads/Screen-shot-2012-04-11-at-1_25_31-PM.jpg" /></p>
<h2>
	The Elements of Typographic Style Applied to the Web</h2>
<p>
	<img alt="The Elements of Typographic Style book cover" src="/uploads/article_uploads/200px-BringhurstEoTS.jpg" style="margin-left: 10px; margin-right: 10px; float: right; width: 81px; height: 150px; " />Robert Bringhurst&rsquo;s <em>The Elements of Typographic Style</em> is known as the de facto standard for typography use. The book is a great resource for designers (I pretty much keep one within 3 feet of me at all times), and most design courses use this book to teach general to advanced typographic principles.&nbsp;<a href="http://www.webtypography.net/">This site</a>, created by Richard Rutter, takes some of the principles outlined in Bringhurst&rsquo;s book and applies them to a web context, outlining how they are carried out in <span class="caps">CSS</span>. This is a great way for designers and developers alike to brush up on the &ldquo;rules&rdquo; of typography and see how they&rsquo;re carried out on the web. <em>Note: It seems this site has not been updated for several years, but it is still a great resource.</em></p>
<h2>
	Lettering.js</h2>
<p>
	This is a <a href="http://letteringjs.com/">handy jQuery plugin</a> that allows for &ldquo;complete down-to-the-letter control&rdquo;. This is especially handy when the kerning on that huge headline is out of whack. You can easily adjust and be on your way!</p>
<h2>
	FontShop Photoshop Plugin</h2>
<p>
	One of the newest tools out there (in Beta as I write this) is a <a href="http://www.fontshop.com/plugin">plugin for Photoshop</a> created by <a href="http://www.fontshop.com/">FontShop</a>. It allows the user to preview FontShop fonts in their PSD file. The beauty of this? Now you can show a client a layout without having to purchase the fonts until the layout is approved. Now, if only Typekit would come out with something like this&hellip;</p>
<p>
	<img alt="FontShop Photoshop Plugin in action." src="/uploads/article_uploads/fontshop-plugin-previewing.png" /></p>
<h2>
	Cross-Browser Kerning Pairs and Ligatures</h2>
<p>
	Another interesting tool that has come across the wire is this <a href="http://aestheticallyloyal.com/public/optimize-legibility/">nifty <span class="caps">CSS</span> declaration</a> that &ldquo;improves handling of kerning pairs and ligatures in modern browsers.&rdquo;</p>
<p>
	<code>&#123;&nbsp;text-rendering: optimizeLegibility;&nbsp;&#125;</code></p>
<p>
	<img alt="With and without example of declaration in use." src="/uploads/article_uploads/Screen shot 2012-04-12 at 3_59_46 PM.png" /></p>
<p>
	Currently this is supported by Safari 5, Webkit, and Chrome. Interestingly, Firefox uses the declaration by default for text sizes over 20 pixels. As usual, there are a <a href="http://aestheticallyloyal.com/public/optimize-legibility/">few bugs</a> to keep in mind.</p>
<p>
	Check out some more handy type tools at <a href="http://www.nicewebtype.com/">www.nicewebtype.com</a>.</p>
]]></description>
            <dc:subject><![CDATA[Featured, Design should enhance usability.,]]></dc:subject>
      <dc:date>2012-04-17T10:39:09+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Andy Rossi Makes Second Appearance On Method &amp; Craft]]></title>
      <link>http://seesparkbox.com/foundry/andy_rossi_makes_second_appearance_on_method_and_craft</link>
      <guid>http://seesparkbox.com/foundry/andy_rossi_makes_second_appearance_on_method_and_craft#When:12:00:35Z</guid>
              <description><![CDATA[Andy shows how you can use Photoshop’s “Layer Comps” feature to mimic Fireworks’ helpful “States” functionality. It's pretty awesome.<p>
	In Photoshop, do you have a difficult time finding which layers need to be visible per layout or button state? How do you know which layers work together? Huzzah &ndash; there is a simple solution!</p>
<p>
	Andy loans his silky smooth voice to Method &amp; Craft for his second feature, a screencast, on the design-oriented site. He explains how you can use Photoshop&rsquo;s &ldquo;Layer Comps&rdquo; feature to mimic Fireworks&rsquo; helpful &ldquo;States&rdquo; functionality. If you use Photoshop often and are not familiar with this feature, you won't want to miss this really helpful tutorial.</p>
<p>
	<a class="the-link" href="http://methodandcraft.com/videos/states-and-layer-comps">Check Out Andy On Method &amp; Craft</a></p>
]]></description>
            <dc:subject><![CDATA[Featured, Education keeps us current.,]]></dc:subject>
      <dc:date>2012-04-13T12:00:35+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Mobile Web Retail Has Changed the Game (Already)]]></title>
      <link>http://seesparkbox.com/foundry/mobile_web_retail_has_changed_the_game_already</link>
      <guid>http://seesparkbox.com/foundry/mobile_web_retail_has_changed_the_game_already#When:12:00:40Z</guid>
              <description><![CDATA[Businesses must adapt and keep pace with the growth of consumers using mobile web devices. Jän highlights just how stiff that pace has become.<p>
	We are undergoing a cultural shift. Mobile devices <strike>are changing</strike> have changed the way consumers buy and how companies market, advertise, and resolve service issues. It's happening now.</p>
<p>
	As of December 2011, 48.1% of all US mobile subscribers own a smartphone according to&nbsp;<a href="http://www.comscore.com/">ComScore's</a>&nbsp;annual mobile report.&nbsp;Apple is on pace to sell 100 million iPads by year's end; and according to <a href="http://www.forrester.com/">Forrester</a>, one billion people across the planet will have smartphones by 2016. <em>One billion.</em> We have not seen this particular type of technology adoption and growth for <em>any other consumer product</em>.&nbsp;</p>
<p>
	The masses are subsequently adopting mobile as their main channel to interact with companies, leaving businesses&nbsp;scrambling to &quot;go mobile.&quot; Forrester reports that business marketing budgets for mobile will grow 100% by 2015.</p>
<p>
	Bringing a company's true brand experience to mobile devices is more important than ever, and you have got to get it right <em>the first time</em>. A survey from Harris Interactive reports, &quot;63 percent of all online adults would be less likely to buy from the same company via other purchase channels if they experienced a problem when conducting a mobile transaction.&quot;&nbsp;</p>
<p>
	Here's a great quote about mobile sales potential from Kenichiro Nakajima, Chief Mobile Officer at Rakuten, Japan's top retail website:&nbsp;</p>
<blockquote>
	<p>
		Mobile sales are beginning to make a serious impact on the market. We're already seeing that consumers will buy more on their mobile phones than they will on their PCs.... Consumers take their mobile devices everywhere, so brands that really embrace multichannel sales and understand the differences between shopping platforms have the potential to literally travel with their customers.</p>
</blockquote>
<p>
	At Sparkbox, we believe there is no better multichannel platform than the web, so we continue to encourage well-designed mobile web applications over mobile native apps for most purposes. We anticipate that companies which embrace a web design strategy which allows their brand to be harmoniously presented across all channels will win out over competitors that don't. It's just a matter of time. (This <a href="http://seesparkbox.com/foundry/safety_net">previous article from Ben</a>&nbsp;elaborates on our views of mobile web strategy.)</p>
<p>
	Just like the first years of the internet, consumers will allow a small grace period. Soon, however, consumers will demand an equal and congruent experience from their brands as they continue to integrate mobile devices into their lives.</p>
<p>
	<em>Source: 1to1media.com -&nbsp;<a href="http://www.1to1media.com/view.aspx?docid=33507&amp;utm_source=1to1weekly&amp;utm_medium=H&amp;utm_campaign=04022012">Top Mobile Trends to Watch</a></em></p>
]]></description>
            <dc:subject><![CDATA[Featured, A well-crafted site adds value.,]]></dc:subject>
      <dc:date>2012-04-09T12:00:40+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Sparkbox Is Hiring]]></title>
      <link>http://seesparkbox.com/foundry/sparkbox_is_hiring</link>
      <guid>http://seesparkbox.com/foundry/sparkbox_is_hiring#When:20:31:10Z</guid>
              <description><![CDATA[Calling all front-end developers. We’re looking for a couple hard-working folks to roll up their sleeves and join the Sparkbox team. <p>
	Calling all front-end developers. We&rsquo;re looking for a couple hard-working folks to roll up their sleeves and join the Sparkbox team.&nbsp;</p>
<p>
	We build responsive, standards-compliant, content-focused, well-crafted, accessible, valuable, beautiful websites, and we're looking for some web geeks that do the same. If you want to go home with HTML, CSS, and CMS under your finger nails each day, you'll fit in just fine. You'll be heavy into ExpressionEngine and WordPress daily, and you may get a little dirty with some Ruby, PHP, and JavaScript as well.</p>
<p>
	Passion, character, and a killer portfolio are a requirement. A long resum&eacute; is not.</p>
<p>
	We also love Macs, food, and our families. Not necessarily in that order.</p>
<p>
	Send a link to your blog, GitHub account, online portfolio, and/or responsive resum&eacute; to info(at)heysparkbox.com, and you could find yourself working on some awesome projects with some equally awesome people.</p>
<p>
	We're ready to roll, so get on it.</p>
]]></description>
            <dc:subject><![CDATA[Featured, There is no "i" in team.,]]></dc:subject>
      <dc:date>2012-04-02T20:31:10+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Responsive Web Design and JavaScript]]></title>
      <link>http://seesparkbox.com/foundry/responsive_web_design_and_javascript</link>
      <guid>http://seesparkbox.com/foundry/responsive_web_design_and_javascript#When:12:00:00Z</guid>
              <description><![CDATA[Is your RWD tool belt feeling a little light? You're probably missing the right JavaScript. Rob Tarr has just what you may be looking for.<div class="writeboardbody">
	<p>
		If you haven&rsquo;t read <a href="http://www.alistapart.com/articles/responsive-web-design/">Ethan&rsquo;s article</a>, stop now, read it, and then come back here.</p>
	<p>
		Now, let's talk about some responsive web design. For over a year now, we've been developing responsive websites almost exclusively at Sparkbox, and I&rsquo;ve found something missing in our responsive tool belt &ndash; a good way to handle JavaScript.</p>
	<h2>
		Example</h2>
	<p>
		Recently, I was working on a secondary navigation with two sections. At media queries for smaller sized screens, the navigation had links to show and hide each section using jQuery animations. This posed a problem, however. After they were hidden, jQuery left <code>style=&quot;display: none&quot;</code> on the elements. After resizing the browser and jumping to a media query for a larger sized screen, these elements should have been shown without the need for the additional links, but they were hidden because of the inline style.&nbsp;</p>
	&#123;exp:gist:fetch id='2178229' file='html'&#125;
	<p>
		Now, I know that everyone likes to say that only developers change their browser sizes to see how things respond. There are real problems with this type of thinking. What if the user maximizes their window or makes it smaller based on the content? This might switch media queries, triggering a break in the secondary navigation. Here's another example that is pretty relevant &ndash; what if the controlling media query is somewhere around 900px? A simple orientation change of an iPad would cause these navigation elements to disappear. Oops. Do you care now?</p>
	<h2>
		Solution</h2>
	<p>
		The solution to this problem lies in the elusive <code>matchMedia</code> method; it provides events triggered by media queries.</p>
	<p>
		In order to run code based on media queries, I'm using <code>mediaCheck</code> (a wrapper I've written around <code>matchMedia</code> to fire events when entering or leaving a designated media query) to trigger the cleanup code when entering larger media queries.</p>
	&#123;exp:gist:fetch id='2178229' file='js'&#125;
	<p>
		Now when the 600px media query is fired, it will remove the <code>style</code> attributes and all is well with the secondary nav.</p>
	<p>
		<code>mediaCheck</code>&nbsp;provides a nice wrapper to easily turn code on and off based on media queries. Switching behaviors and cleaning up code between media queries is now made simple. JavaScript mischief managed.</p>
	&#123;exp:gist:fetch id='2205277' file='js'&#125;

	<p>
		Take it out for a test drive, kick the tires, and&nbsp;<a href="https://github.com/sparkbox/mediaCheck">look under the hood</a>. Feel free to ask questions and contribute, and let's move the web forward together.</p>
	<p>
		&nbsp;</p>
</div>
]]></description>
            <dc:subject><![CDATA[Featured, Meet them where they are., CSS, HTML, JavaScript,]]></dc:subject>
      <dc:date>2012-03-26T12:00:00+00:00</dc:date>
    </item>

    
    </channel>
</rss>
