<?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>Damian Nicholson &#187; jQuery</title>
	<atom:link href="http://damiannicholson.com/posts/category/jquery/feed" rel="self" type="application/rss+xml" />
	<link>http://damiannicholson.com</link>
	<description>Another opinionated web developer sharing his thoughts</description>
	<lastBuildDate>Wed, 14 Apr 2010 21:20:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>A precursor: jQuery UI by Dan Wellman</title>
		<link>http://damiannicholson.com/posts/jquery-ui-book-review</link>
		<comments>http://damiannicholson.com/posts/jquery-ui-book-review#comments</comments>
		<pubDate>Sun, 06 Dec 2009 19:00:48 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[Book review]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>

		<guid isPermaLink="false">http://damiannicholson.com/?p=183</guid>
		<description><![CDATA[Not too long ago, I found out that Dan Wellman was looking for people to review his new book entitled jQuery UI 1.7. Naturally I jumped at the chance, and his publishers were generous enough to send me a copy.
I&#8217;ve used a number of the widgets included in the jQuery UI library before, and found [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-185  aligncenter" src="http://damiannicholson.com/wp-content/uploads/2009/12/Screen-shot-2009-12-06-at-18.12.06.png" alt="jQuery UI" width="287" height="87" /></p>
<p>Not too long ago, I found out that <a href="http://www.danwellman.co.uk/" onclick="pageTracker._trackPageview('/outgoing/www.danwellman.co.uk/?referer=');">Dan Wellman</a> was looking for people to review his new book entitled jQuery UI 1.7. Naturally I jumped at the chance, and his <a href="http://www.packtpub.com/" onclick="pageTracker._trackPageview('/outgoing/www.packtpub.com/?referer=');">publishers</a> were generous enough to send me a copy.</p>
<p>I&#8217;ve used a number of the widgets included in the <a href="http://jqueryui.com/" onclick="pageTracker._trackPageview('/outgoing/jqueryui.com/?referer=');">jQuery UI</a> library before, and found them to be great out of the box, but tricky to skin. Because of this, I was particularly interested in seeing whether Dan delved into this.</p>
<p>So far I&#8217;m about a third of the way through the book, and Dan has not disappointed. I&#8217;ll provide a more detailed review once I&#8217;m finished, but it&#8217;s already answered a lot of the questions I had at the outset, so it&#8217;s been a worthwhile read for me.</p>
<p style="text-align: center;"><a href="http://www.packtpub.com/user-interface-library-for-jquery-ui-1-7/book" onclick="pageTracker._trackPageview('/outgoing/www.packtpub.com/user-interface-library-for-jquery-ui-1-7/book?referer=');"><img class="size-full wp-image-189    aligncenter" src="http://damiannicholson.com/wp-content/uploads/2009/12/jqueryui1.jpg" alt="jQuery UI 1.7 by Dan Wellman" width="272" height="336" /></a></p>
<p>Also because jQuery UI is a mature framework, I can see <a href="http://www.packtpub.com/user-interface-library-for-jquery-ui-1-7/book" onclick="pageTracker._trackPageview('/outgoing/www.packtpub.com/user-interface-library-for-jquery-ui-1-7/book?referer=');">this book</a> having longevity.</p>
]]></content:encoded>
			<wfw:commentRss>http://damiannicholson.com/posts/jquery-ui-book-review/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Abusing JavaScript Frameworks</title>
		<link>http://damiannicholson.com/posts/abusing-javascript-frameworks</link>
		<comments>http://damiannicholson.com/posts/abusing-javascript-frameworks#comments</comments>
		<pubDate>Thu, 03 Dec 2009 12:30:10 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://damiannicholson.com/?p=144</guid>
		<description><![CDATA[Tools like jQuery and MooTools make traversing and manipulating the DOM incredibly easy. So easy that you can get carried away with it sometimes. I have fallen down this trap more than once in my career as a web developer.
Here&#8217;s an excerpt from an article I stumbled across entitled Add Icons to External Links with [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.flickr.com/photos/publicenergy/1846375599/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/publicenergy/1846375599/?referer=');"><img class="aligncenter size-full wp-image-156" title="cow" src="http://damiannicholson.com/wp-content/uploads/2009/12/cow.jpg" alt="cow" width="500" height="357" /></a></p>
<p>Tools like <a href="http://jquery.com/" onclick="pageTracker._trackPageview('/outgoing/jquery.com/?referer=');">jQuery</a> and <a href="http://mootools.net/" onclick="pageTracker._trackPageview('/outgoing/mootools.net/?referer=');">MooTools</a> make traversing and manipulating the DOM incredibly easy. So easy that you can get carried away with it sometimes. I have fallen down this trap more than once in my career as a web developer.</p>
<p>Here&#8217;s an excerpt from an article I stumbled across entitled <em><a href="http://pinoytech.org/blog/post/Add-Icons-to-External-Links-with-Mootools-and-CSS" onclick="pageTracker._trackPageview('/outgoing/pinoytech.org/blog/post/Add-Icons-to-External-Links-with-Mootools-and-CSS?referer=');">Add Icons to External Links with Mootools and CSS</a></em>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'domready'</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: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>link<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>link.<span style="color: #660066;">hostname</span> <span style="color: #339933;">!=</span> window.<span style="color: #660066;">location</span>.<span style="color: #660066;">host</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   link.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'external'</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: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Pretty basic stuff &#8211; iterating through all the anchors on the page and adding a class if the current link goes to an external site.</p>
<p>Whether this is apparent to the author I don&#8217;t know, but the same effect can be achieved using <strong>only </strong><strong>CSS</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">a<span style="color: #00AA00;">&#91;</span>href<span style="color: #00AA00;">^=</span><span style="color: #ff0000;">'http://'</span><span style="color: #00AA00;">&#93;</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* styling */</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>Note:</strong> the solution I pointed out here isn&#8217;t anything new. <a href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors" onclick="pageTracker._trackPageview('/outgoing/www.w3.org/TR/CSS21/selector.html_attribute-selectors?referer=');">CSS attribute selectors</a> have been around since CSS2.1, and so are are supported in all major browsers bar <a href="http://www.bringdownie6.com/" onclick="pageTracker._trackPageview('/outgoing/www.bringdownie6.com/?referer=');">one</a>(no prizes for those who get this right).</p>
<p>Whilst this example is low impact, I&#8217;ve come to the conclusion that the underlying principle is one which creeps up on a lot designers and developers who get the JS fever.</p>
<blockquote>
<h3>JavaScript libraries are an easy  fall back for front-end problems which can&#8217;t be solved quickly.</h3>
</blockquote>
<p>My personal opinion to problems I can&#8217;t solve is that the use of JavaScript libraries should be a <em>last resort</em>.</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/torek/2467519466/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/torek/2467519466/?referer=');"><img class="aligncenter size-full wp-image-170" title="lazydog" src="http://damiannicholson.com/wp-content/uploads/2009/12/lazydog.jpg" alt="lazydog" width="450" height="300" /></a></p>
<p>Sometimes people are too lazy to tackle front-end problems head on. In my experience it&#8217;s worth the effort researching a possible solution, as it makes you think about the problem and  define it more clearly. Most of the time you find yourself in one of the following situations, none of which are bad.</p>
<ul>
<li>You&#8217;ve thought about it a bit and realise it&#8217;s very similar to a problem you&#8217;ve faced in the past.</li>
<li>You find an alternative, in which case you&#8217;ve learnt something new.</li>
<li>There isn&#8217;t an alternative, in which case you&#8217;ve picked up some new knowledge along the way and realised that your solution was optimal. Pat yourself on the back.</li>
</ul>
<h3>So what do you think?</h3>
]]></content:encoded>
			<wfw:commentRss>http://damiannicholson.com/posts/abusing-javascript-frameworks/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->