<?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>BorkWeb &#187; toolkit</title>
	<atom:link href="http://borkweb.com/story/tag/toolkit/feed" rel="self" type="application/rss+xml" />
	<link>http://borkweb.com</link>
	<description>Some People Are Squirrel Handed.</description>
	<lastBuildDate>Tue, 17 Jan 2012 22:00:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>jQuery 1.2 Released!</title>
		<link>http://borkweb.com/story/jquery-12-released</link>
		<comments>http://borkweb.com/story/jquery-12-released#comments</comments>
		<pubDate>Tue, 11 Sep 2007 11:29:15 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery 1.2]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[toolkit]]></category>

		<guid isPermaLink="false">http://borkweb.com/story/jquery-12-released</guid>
		<description><![CDATA[This is a major release for the JavaScript library that I have grown to love. Before I list the new features, it is important to note what functionality has been removed from jQuery. Here&#8217;s the deprecated functionality: These Selectors XPath Descendant Selector: $(&#8220;div//p&#8221;) XPath Child Selector: $(&#8220;div/p&#8221;) XPath Parent Selector: $(&#8220;p/../div&#8221;) XPath Contains Predicate Selector: [...]]]></description>
			<content:encoded><![CDATA[<p>This is a <a href="http://jquery.com/blog/2007/09/10/jquery-12-jqueryextendawesome/">major release</a> for the JavaScript library that I have <a href="http://borkweb.com/story/the-ajax-experience-jquery-toolkit">grown to</a> <a href="http://borkweb.com/story/book-review-learning-jquery">love</a>.  Before I list the new features, it is important to note what functionality has been removed from jQuery.  </p>
<h2 id="_heres-the-deprecated_1" >Here&#8217;s the deprecated functionality:</h2>
<ul>
<li>These Selectors
<ul>
<li><strong>XPath Descendant Selector</strong>: $(&#8220;div//p&#8221;)</li>
<li><strong>XPath Child Selector</strong>: $(&#8220;div/p&#8221;)</li>
<li><strong>XPath Parent Selector</strong>: $(&#8220;p/../div&#8221;)</li>
<li><strong>XPath Contains Predicate Selector</strong>: $(&#8220;div[p]&#8220;)</li>
<li><strong>XPath Attribute Selector</strong>: $(&#8220;a[@href]&#8220;)</li>
</ul>
</li>
<li><strong>Calling clone() with an argument</strong>: $(&#8220;div&#8221;).clone(false);</li>
<li>These Traversal Functions <em>use the new .slice() instead)</em>:
<ul>
<li>$(&#8220;div&#8221;).eq(0);</li>
<li>$(&#8220;div&#8221;).lt(2);</li>
<li>$(&#8220;div&#8221;).gt(2);</li>
</ul>
</li>
<li>These Ajax Functions:
<ul>
<li>$(&#8220;#elem&#8221;).loadIfModified(&#8220;some.php&#8221;);</li>
<li>$.getIfModified(&#8220;some.php&#8221;);</li>
<li>$.ajaxTimeout(3000);</li>
<li>$(&#8230;).evalScripts();</li>
</ul>
</li>
</ul>
<p>Thankfully a number of those don&#8217;t effect me.  I&#8217;ll have to comb through my code to get rid of the .gt, .lt, and .eq traversal functions as well as a few of the selectors&#8230;but other than that, I&#8217;m good to go.  To find out more about workarounds for the above removed functionality, check the <a href="http://docs.jquery.com/Release:jQuery_1.2">jQuery 1.2 release notes</a></p>
<p>Now&#8230;on to the good stuff.  </p>
<h2 id="_new-features_1" >New features!</h2>
<ul>
<li> <b><a href="http://docs.jquery.com/Release:jQuery_1.2/Selectors" title="Release:jQuery 1.2/Selectors">Selectors</a></b></p>
<ul>
<li>&nbsp;:has(selector)
</li>
<li>&nbsp;:header
</li>
<li>&nbsp;:animated
</li>
<li> XPath Selector Plugin
</li>
</ul>
</li>
<li> <b><a href="http://docs.jquery.com/Release:jQuery_1.2/Attributes" title="Release:jQuery 1.2/Attributes">Attributes</a></b>
<ul>
<li> .val() Overhaul
</li>
</ul>
</li>
<li> <b><a href="http://docs.jquery.com/Release:jQuery_1.2/Traversing" title="Release:jQuery 1.2/Traversing">Traversing</a></b>
<ul>
<li> .map()
</li>
<li> .prevAll() / .nextAll()
</li>
<li> .slice()
</li>
<li> .hasClass()
</li>
<li> .andSelf()
</li>
<li> .contents()
</li>
</ul>
</li>
<li> <b><a href="http://docs.jquery.com/Release:jQuery_1.2/Manipulation" title="Release:jQuery 1.2/Manipulation">Manipulation</a></b>
<ul>
<li> .wrapInner() / .wrapAll()
</li>
<li> .replaceWith() / .replaceAll()
</li>
<li> Event Cloning
</li>
</ul>
</li>
<li> <b><a href="http://docs.jquery.com/Release:jQuery_1.2/CSS" title="Release:jQuery 1.2/CSS">CSS</a></b>
<ul>
<li> .offset()
</li>
<li> .height() / .width() for document and window
</li>
</ul>
</li>
<li> <b><a href="http://docs.jquery.com/Release:jQuery_1.2/Ajax" title="Release:jQuery 1.2/Ajax">Ajax</a></b>
<ul>
<li> Partial .load()
</li>
<li> Cross-Domain getScript
</li>
<li> JSONP
</li>
<li> .serialize() Overhaul
</li>
<li> Disable Caching
</li>
</ul>
</li>
<li> <b><a href="http://docs.jquery.com/Release:jQuery_1.2/Effects" title="Release:jQuery 1.2/Effects">Effects</a></b>
<ul>
<li> .stop()
</li>
<li> %/em Animations
</li>
<li> Color Animations
</li>
<li> Relative Animations
</li>
<li> Queue Control
</li>
<li>&nbsp;:animated
</li>
<li> step: Function
</li>
</ul>
</li>
<li> <b><a href="http://docs.jquery.com/Release:jQuery_1.2/Events" title="Release:jQuery 1.2/Events">Events</a></b>
<ul>
<li> Namespaced Events
</li>
<li> .triggerHandler()
</li>
</ul>
</li>
<li> <b><a href="http://docs.jquery.com/Release:jQuery_1.2/Internals" title="Release:jQuery 1.2/Internals">Internals</a></b>
<ul>
<li> Documentation Move
</li>
<li> Expando Management
</li>
</ul>
</li>
</ul>
<p>I have to say&#8230;it is a pretty snazzy release and I&#8217;ll begin implementing the new version shortly. w00t.</p>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/jquery-12-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Ajax Experience: jQuery Toolkit</title>
		<link>http://borkweb.com/story/the-ajax-experience-jquery-toolkit</link>
		<comments>http://borkweb.com/story/the-ajax-experience-jquery-toolkit#comments</comments>
		<pubDate>Wed, 01 Nov 2006 14:56:59 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ajaxexperience]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[john resig]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[toolkit]]></category>

		<guid isPermaLink="false">http://borkweb.com/story/the-ajax-experience-jquery-toolkit</guid>
		<description><![CDATA[I went to The Ajax Experience with high expectations of catching some great tips regarding development in an Ajax environment. At the same time, I was sure of my previous decision with the use of Prototype and Script.aculo.us was as good as it gets (without diving into the widgetized world&#8230;e.g. Dojo). I attended John Resig&#8216;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/borkweb/285731517/" title="Photo Sharing"><img src="http://static.flickr.com/105/285731517_8d4097a342_o.gif" width="383" height="120" alt="jquery" class="post_image" align="left"/></a> I went to <a href="http://theajaxexperience.com">The Ajax Experience</a> with high expectations of catching some great tips regarding development in an Ajax environment.  At the same time, I was sure of my previous decision with the use of <a href="http://borkweb.com/story/prototype-makes-javascript-painless">Prototype</a> and <a href="http://borkweb.com/story/scriptaculous-is-my-new-best-friend">Script.aculo.us</a> was as good as it gets (without diving into the widgetized world&#8230;e.g. <a href="http://dojotoolkit.org">Dojo</a>).  I attended <a href="http://ejohn.org">John Resig</a>&#8216;s presentation on <a href="http://jquery.org">jQuery</a> and I became a convert.</p>
<p>John&#8217;s presentation was less of a presentation and more of a Q&#038;A Demonstration, which suited me fine.  As soon as I knew where to download the code, I popped open my laptop and started fiddling around with the toolkit &#8211; passively paying attention to the questions and answers, as they tended to be extremely basic questions&#8230;you see, jQuery is pretty darn intuitive.</p>
<p>jQuery&#8217;s mantra is <strong>&#8220;Find stuff and do stuff to it&#8221;</strong></p>
<p>Yeah, I wasn&#8217;t converted because jQuery was the first toolkit to support chaining and that it executes it nicely.  Nor was I converted because of its extensive <a href="http://jquery.com/plugins">plugin library</a>.  Nope.  My conversion was the <strong><em>effecient</em> findability of elements within the DOM</strong>!  This is what really makes jQuery ballsy.  The toolkit was built with findability in mind using already established standards!  jQuery fully supports <a href="http://www.w3.org/TR/REC-CSS1#basic-concepts">CSS1</a>, <a href="http://www.w3.org/TR/REC-CSS2/selector.html">CSS2</a>, <a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215/">CSS3</a>, and basic <a href="http://www.w3.org/TR/xpath">XPath</a> when hunting for elements.  For example:</p>
<p>Lets start with something simple:<br />
Say I wanted to find all elements within the page that had the class: <strong>bork</strong> and hide them, I&#8217;d do:</p>
<pre class="brush: jscript; title: ; notranslate">
$('.bork').hide();
</pre>
<p>Alright, say I wanted to find all anchor tags with the target set to _blank and add the class <strong>whee</strong> to it:</p>
<pre class="brush: jscript; title: ; notranslate">
$('a[@target=_blank]').addClass('whee');
</pre>
<p>Now, lets say I want to find all anchor tags with the target set to _blank and add the class whee to them AND append <strong>(opens in a new window)</strong> as a sibling to the link itself.</p>
<pre class="brush: jscript; title: ; notranslate">
$('a[@target=_blank]').each(
  function(){
    $(this).addClass('whee');
    $(this).after('(Opens in a new window)');
  }
);
</pre>
<p>Now, if I knew I was going to use the above a whole lot all over hell&#8217;s half acre, I could create a jQuery plugin that can be chained!  Here&#8217;s how I&#8217;d create that feature and allow for the passing of class name:</p>
<pre class="brush: jscript; title: ; notranslate">
jQuery.fn.opensInNewWindow = function(classname){
	return this.each(
		function(){
                        $(this).addClass(classname);
                        $(this).after('(Opens in a new window)');
		}
	);
};
</pre>
<p>Now, when I want to put <strong>Opens in a new window</strong> on a series of elements, I can do so with my newly created plugin:</p>
<pre class="brush: jscript; title: ; notranslate">
$('a[@target=_blank]').opensInNewWindow('whee');

//I can do this for ANY element I want even if it isn't a link
$('span.bork').opensInNewWindow('zomg');
$('div#w00t ul.nav').opensInNewWindow('roflcopter');
</pre>
<p>Now, to make use of the chainability, you can write the plugin more simply than what I did up above.  You can do this: (thanks to <em>malsup</em>, a commenter on this article)</p>
<pre class="brush: jscript; title: ; notranslate">
jQuery.fn.opensInNewWindow = function(classname){
	return this.each(
		function(){
      $(this).addClass(classname).after('(Opens in a new window)');
		}
	);
};
</pre>
<p>Cake walk.  As your proficiency in finding objects within a page increases, your code will become shorter.  </p>
<p>jQuery currently has a very active community and mailing list (averaging at about 90 posts per day) so if you have questions regarding the toolkit, you can become a member and ask away&#8230;  In addition, there&#8217;s a <a href="http://jquery.com/blog">jQuery blog</a> where John posts comparison code showing the difference between jQuery and other available toolkits.  (here&#8217;s a <a href="http://jquery.com/blog/2006/10/18/zebra-table-showdown/">Zebra striping example</a>)</p>
<p>If you are still on the hunt for a JavaScript toolkit for Ajax, DOM manipulation, etc <strong>or</strong> you find your toolkit of choice too clunky, give jQuery a shot.  You&#8217;ll be pleased with the results.</p>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/the-ajax-experience-jquery-toolkit/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

