<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Brandon Aaron</title>
	
	<link>http://blog.brandonaaron.net</link>
	<description>Blog in Development</description>
	<pubDate>Fri, 23 May 2008 21:18:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<geo:lat>32.831228</geo:lat><geo:long>-97.145939</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/BrandonAaron" type="application/rss+xml" /><item>
		<title>Dimensions Now in jQuery Core</title>
		<link>http://feeds.feedburner.com/~r/BrandonAaron/~3/287230305/</link>
		<comments>http://blog.brandonaaron.net/2008/05/09/dimensions-now-in-jquery-core/#comments</comments>
		<pubDate>Sat, 10 May 2008 01:51:58 +0000</pubDate>
		<dc:creator>Brandon Aaron</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Dimensions]]></category>

		<category><![CDATA[jQuery Plugins]]></category>

		<guid isPermaLink="false">http://blog.brandonaaron.net/?p=45</guid>
		<description><![CDATA[The Dimensions plugin was originally started by Paul Bakaus. By popular demand my offset plugin was merged with the Dimensions plugin. From that point on I contributed several other methods to Dimensions and helped maintain the plugin with Paul. Dimensions became one of the most widely depended on plugins by developers and other plugins. It [...]]]></description>
			<content:encoded><![CDATA[<p>The Dimensions plugin was originally started by <a href="http://paulbakaus.com/">Paul Bakaus</a>. By popular demand my offset plugin was merged with the Dimensions plugin. From that point on I contributed several other methods to Dimensions and helped maintain the plugin with Paul. Dimensions became one of the most widely depended on plugins by developers and other plugins. It was a very common request to have Dimensions moved into the core to help relieve plugin dependency issues. We started by moving the most popular methods into the core but that wasn&#8217;t enough. The plugin was still a very common dependency. As of <span class="caps">SVN</span> Revision 5345 the Dimensions plugin has been merged into the jQuery core. You can find the documentation for the current Dimensions plugin on the <a href="http://docs.jquery.com/Plugins/dimensions">jQuery documentation&nbsp;wiki</a>.</p>
<img src="http://feeds.feedburner.com/~r/BrandonAaron/~4/287230305" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.brandonaaron.net/2008/05/09/dimensions-now-in-jquery-core/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=BrandonAaron&amp;itemurl=http%3A%2F%2Fblog.brandonaaron.net%2F2008%2F05%2F09%2Fdimensions-now-in-jquery-core%2F</feedburner:awareness><feedburner:origLink>http://blog.brandonaaron.net/2008/05/09/dimensions-now-in-jquery-core/</feedburner:origLink></item>
		<item>
		<title>Getting the Scrollbar Width</title>
		<link>http://feeds.feedburner.com/~r/BrandonAaron/~3/287200193/</link>
		<comments>http://blog.brandonaaron.net/2008/05/09/getting-the-scrollbar-width/#comments</comments>
		<pubDate>Sat, 10 May 2008 01:03:56 +0000</pubDate>
		<dc:creator>Brandon Aaron</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Dimensions]]></category>

		<category><![CDATA[jQuery Snippets]]></category>

		<guid isPermaLink="false">http://blog.brandonaaron.net/?p=46</guid>
		<description><![CDATA[I've been asked a few times if Dimensions would provide a method for getting the scrollbar width. In Dimensions 1.0 I created an internal method for finding the scrollbar width to hack around some browser limitations. I eventually found other ways around those limitations and that code is no longer in Dimensions. I know that [...]]]></description>
			<content:encoded><![CDATA[<p>I've been asked a few times if Dimensions would provide a method for getting the scrollbar width. In Dimensions 1.0 I created an internal method for finding the scrollbar width to hack around some browser limitations. I eventually found other ways around those limitations and that code is no longer in Dimensions. I know that in some unusual cases it can be useful, so I want to go ahead and provide that code as one of my <a href="http://blog.brandonaaron.net/tag/jquery-snippets/">jQuery snippets</a>. It is just a single method added to the jQuery namespace called&nbsp;<code>getScrollbarWidth</code>.</p>
<div class="syntax_hilite">
<div id="javascript-2">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$.<span style="color: #006600;">getScrollbarWidth</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><a href="http://brandonaaron.net/jquery/snippets/getScrollbarWidth/example.html">Here</a> is an example of it and <a href="http://brandonaaron.net/jquery/snippets/getScrollbarWidth/jquery.getScrollbarWidth.js">here</a> is the small&nbsp;script.</p>
<img src="http://feeds.feedburner.com/~r/BrandonAaron/~4/287200193" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.brandonaaron.net/2008/05/09/getting-the-scrollbar-width/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=BrandonAaron&amp;itemurl=http%3A%2F%2Fblog.brandonaaron.net%2F2008%2F05%2F09%2Fgetting-the-scrollbar-width%2F</feedburner:awareness><feedburner:origLink>http://blog.brandonaaron.net/2008/05/09/getting-the-scrollbar-width/</feedburner:origLink></item>
		<item>
		<title>jQuery.batch Plugin</title>
		<link>http://feeds.feedburner.com/~r/BrandonAaron/~3/286536904/</link>
		<comments>http://blog.brandonaaron.net/2008/05/08/jquery-batch/#comments</comments>
		<pubDate>Fri, 09 May 2008 03:26:04 +0000</pubDate>
		<dc:creator>Brandon Aaron</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Batch]]></category>

		<category><![CDATA[jQuery Plugins]]></category>

		<guid isPermaLink="false">http://blog.brandonaaron.net/?p=44</guid>
		<description><![CDATA[jQuery methods, in most cases, operate on zero or more matched elements. Getter type methods are an exception. The getter methods only return the results for the first matched element. This is overwhelmingly the typical use-case. However, sometimes you might want to get the results for all matched elements in the jQuery collection. Introducing jQuery.batch, [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery methods, in most cases, operate on zero or more matched elements. Getter type methods are an exception. The getter methods only return the results for the first matched element. This is overwhelmingly the typical use-case. However, sometimes you might want to get the results for all matched elements in the jQuery collection. Introducing jQuery.batch, a small extension to jQuery that adds such&nbsp;functionality.</p>
<p><span id="more-44"></span></p>
<p>jQuery.batch extends the core with plural forms of the getter methods. Methods like attr now have a sibling named attrs. These new methods operate on the whole jQuery collection, returning an array of results. Here are the pluralized methods that jQuery.batch&nbsp;provides.</p>
<ul>
<li>attrs</li>
<li>styles</li>
<li>widths</li>
<li>heights</li>
<li>vals</li>
<li>texts</li>
<li>htmls</li>
</ul>
<p>In addition with the core methods the jQuery.batch plugin offers its own plugin method: jQuery.fn.batch. This method takes the name of an existing plugin/method attached to jQuery.fn along with any additional arguments to pass&nbsp;along.</p>
<div class="syntax_hilite">
<div id="javascript-6">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">batch</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'attr'</span>, <span style="color: #3366CC;">'href'</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Of course since jQuery.batch already provides the attrs method that could also be written&nbsp;as.</p>
<div class="syntax_hilite">
<div id="javascript-7">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">attrs</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'href'</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h3>Plugin&nbsp;Integration</h3>
<p>jQuery.batch makes it easy to integrate with plugins to provide a pluralized sibling by using a method called jQuery.batch.registerPlugin. For example here is the line used within the plugin to register the core&nbsp;methods.</p>
<div class="syntax_hilite">
<div id="javascript-8">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$.<span style="color: #006600;">batch</span>.<span style="color: #006600;">registerPlugin</span><span style="color: #66cc66;">&#40;</span> <span style="color: #3366CC;">'attr'</span>, <span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">'css'</span>,<span style="color: #3366CC;">'styles'</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #3366CC;">'offset'</span>, <span style="color: #3366CC;">'width'</span>, <span style="color: #3366CC;">'height'</span>, <span style="color: #3366CC;">'html'</span>, <span style="color: #3366CC;">'text'</span>, <span style="color: #3366CC;">'val'</span> <span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Basically it is just an argument list of method names. Notice that I passed an array for the css method to manually set the pluralized name to something more desirable. Otherwise, it will just append an 's' to the end of the method&nbsp;name.</p>
<h3>Get&nbsp;jQuery.batch</h3>
<p>You can download, log issues and create feature requests at the plugins home:&nbsp;<a href="http://plugins.jquery.com/project/batch">http://plugins.jquery.com/project/batch</a></p>
<img src="http://feeds.feedburner.com/~r/BrandonAaron/~4/286536904" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.brandonaaron.net/2008/05/08/jquery-batch/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=BrandonAaron&amp;itemurl=http%3A%2F%2Fblog.brandonaaron.net%2F2008%2F05%2F08%2Fjquery-batch%2F</feedburner:awareness><feedburner:origLink>http://blog.brandonaaron.net/2008/05/08/jquery-batch/</feedburner:origLink></item>
		<item>
		<title>New Plugin: Live Query</title>
		<link>http://feeds.feedburner.com/~r/BrandonAaron/~3/145992261/</link>
		<comments>http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/#comments</comments>
		<pubDate>Mon, 20 Aug 2007 04:53:58 +0000</pubDate>
		<dc:creator>Brandon Aaron</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[jQuery Plugins]]></category>

		<category><![CDATA[Live Query]]></category>

		<guid isPermaLink="false">http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/</guid>
		<description><![CDATA[Live Query, previously called Behavior, utilizes the power of jQuery selectors by binding events or firing callbacks for matched elements auto-magically, even after the page has been loaded and the DOM&#160;updated.
For example you could use the following code to bind a click event to all A tags, even any A tags you might add via [...]]]></description>
			<content:encoded><![CDATA[<p>Live Query, previously called Behavior, utilizes the power of jQuery selectors by binding events or firing callbacks for matched elements auto-magically, even after the page has been loaded and the <span class="caps">DOM</span>&nbsp;updated.</p>
<p>For example you could use the following code to bind a click event to all A tags, even any A tags you might add via <span class="caps">AJAX</span> or a&nbsp;script.</p>
<p><span id="more-43"></span></p>
<div class="syntax_hilite">
<div id="javascript-12">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; .<span style="color: #006600;">livequery</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'click'</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'clicked'</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Once you add new A tags to the document, Live Query will bind the click event and there is nothing else that needs to be called or&nbsp;done.</p>
<p>When an element no longer matches a selector the events Live Query bound to it are unbound. Also, the Live Query can be expired by calling <code>expire</code> which will no longer bind anymore events and unbind all the events it previously&nbsp;bound.</p>
<p>Live Query can even be used with the more powerful jQuery selectors. The following Live Query will match and bind a click event to all A tags that have a rel attribute with the word "friend" in it. If one of the A tags is modified by removing the word "friend" from the rel attribute, the click event will be unbound since it is no longer matched by the Live&nbsp;Query. </p>
<div class="syntax_hilite">
<div id="javascript-13">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'a[@rel*=friend]'</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; .<span style="color: #006600;">livequery</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'click'</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; doSomething<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Live Query also has the ability to fire a callback function when it matches a new element and another callback function for when an element is no longer matched. This provides ultimate flexibility and untold use-cases. For example the following code uses a function based Live Query to implement the jQuery hover helper method and remove it when the element is no longer&nbsp;matched. </p>
<div class="syntax_hilite">
<div id="javascript-14">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; .<span style="color: #006600;">livequery</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006600;">hover</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'hover'</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">removeClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'hover'</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006600;">unbind</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'mouseover'</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006600;">unbind</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'mouseout'</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h3>See It In&nbsp;Action</h3>
<p>I've put together <a href="http://brandonaaron.net/jquery/plugins/livequery/test/test.html">two simple demos</a> that utilize both an event based and function based Live Query on unordered&nbsp;lists.</p>
<h3>Get Live&nbsp;Query</h3>
<p>Live Query can be downloaded from the <a href="http://jquery.com/plugins/project/livequery">Live Query project page</a>. <a href="http://brandonaaron.net/docs/livequery/">The Live Query documentation</a> is a work in progress but the <a href="http://brandonaaron.net/docs/livequery/#api"><span class="caps">API</span></a> is fully&nbsp;documented.</p>
<img src="http://feeds.feedburner.com/~r/BrandonAaron/~4/145992261" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=BrandonAaron&amp;itemurl=http%3A%2F%2Fblog.brandonaaron.net%2F2007%2F08%2F19%2Fnew-plugin-live-query%2F</feedburner:awareness><feedburner:origLink>http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/</feedburner:origLink></item>
		<item>
		<title>Dimensions 1.1.2</title>
		<link>http://feeds.feedburner.com/~r/BrandonAaron/~3/145251654/</link>
		<comments>http://blog.brandonaaron.net/2007/08/17/dimensions-112/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 18:35:13 +0000</pubDate>
		<dc:creator>Brandon Aaron</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Dimensions]]></category>

		<category><![CDATA[jQuery Plugins]]></category>

		<guid isPermaLink="false">http://blog.brandonaaron.net/2007/08/17/dimensions-112/</guid>
		<description><![CDATA[Release early, release often. In the 1.1.1 update there was a regression in Safari with calculating the window width and height. I also fixed a bug in getting the offset of table cells with borders in Mozilla. As usual, you can report bugs, request features and download Dimensions 1.1.2 from the Dimensions project&#160;page.
]]></description>
			<content:encoded><![CDATA[<p>Release early, release often. In the 1.1.1 update there was a regression in Safari with calculating the window width and height. I also fixed a bug in getting the offset of table cells with borders in Mozilla. As usual, you can report bugs, request features and download Dimensions 1.1.2 from the <a href="http://jquery.com/plugins/project/dimensions">Dimensions project&nbsp;page</a>.</p>
<img src="http://feeds.feedburner.com/~r/BrandonAaron/~4/145251654" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.brandonaaron.net/2007/08/17/dimensions-112/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=BrandonAaron&amp;itemurl=http%3A%2F%2Fblog.brandonaaron.net%2F2007%2F08%2F17%2Fdimensions-112%2F</feedburner:awareness><feedburner:origLink>http://blog.brandonaaron.net/2007/08/17/dimensions-112/</feedburner:origLink></item>
		<item>
		<title>Dimensions 1.1.1</title>
		<link>http://feeds.feedburner.com/~r/BrandonAaron/~3/145177963/</link>
		<comments>http://blog.brandonaaron.net/2007/08/17/dimensions-111/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 14:32:26 +0000</pubDate>
		<dc:creator>Brandon Aaron</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Dimensions]]></category>

		<category><![CDATA[jQuery Plugins]]></category>

		<guid isPermaLink="false">http://blog.brandonaaron.net/2007/08/17/dimensions-111/</guid>
		<description><![CDATA[I just released Dimensions 1.1.1 which fixes up an issue when trying to get the document width and height. Grab the zip from the Dimensions project&#160;page.
]]></description>
			<content:encoded><![CDATA[<p>I just released Dimensions 1.1.1 which fixes up an issue when trying to get the document width and height. Grab the zip from the <a href="http://jquery.com/plugins/project/dimensions/">Dimensions project&nbsp;page</a>.</p>
<img src="http://feeds.feedburner.com/~r/BrandonAaron/~4/145177963" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.brandonaaron.net/2007/08/17/dimensions-111/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=BrandonAaron&amp;itemurl=http%3A%2F%2Fblog.brandonaaron.net%2F2007%2F08%2F17%2Fdimensions-111%2F</feedburner:awareness><feedburner:origLink>http://blog.brandonaaron.net/2007/08/17/dimensions-111/</feedburner:origLink></item>
		<item>
		<title>Dimensions 1.1</title>
		<link>http://feeds.feedburner.com/~r/BrandonAaron/~3/143525836/</link>
		<comments>http://blog.brandonaaron.net/2007/08/12/dimensions-11/#comments</comments>
		<pubDate>Mon, 13 Aug 2007 04:32:03 +0000</pubDate>
		<dc:creator>Brandon Aaron</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Dimensions]]></category>

		<category><![CDATA[jQuery Plugins]]></category>

		<guid isPermaLink="false">http://blog.brandonaaron.net/2007/08/12/dimensions-11/</guid>
		<description><![CDATA[I just released Dimensions 1.1. It includes a new option to include margins for the outerWidth and outerHeight methods. I've also fixed the issues with Safari 3 and the offset method. This update does require jQuery 1.1.3 or greater. Feel free to grab the zip from the Dimensions project page. Oh and the docs have [...]]]></description>
			<content:encoded><![CDATA[<p>I just released Dimensions 1.1. It includes a new option to include margins for the outerWidth and outerHeight methods. I've also fixed the issues with Safari 3 and the offset method. This update does require jQuery 1.1.3 or greater. Feel free to grab the zip from the <a href="http://jquery.com/plugins/project/dimensions/">Dimensions project page</a>. Oh and the <a href="http://brandonaaron.net/docs/dimensions/">docs</a> have been updated for&nbsp;1.1.</p>
<img src="http://feeds.feedburner.com/~r/BrandonAaron/~4/143525836" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.brandonaaron.net/2007/08/12/dimensions-11/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=BrandonAaron&amp;itemurl=http%3A%2F%2Fblog.brandonaaron.net%2F2007%2F08%2F12%2Fdimensions-11%2F</feedburner:awareness><feedburner:origLink>http://blog.brandonaaron.net/2007/08/12/dimensions-11/</feedburner:origLink></item>
		<item>
		<title>Dimensions 1.0.1</title>
		<link>http://feeds.feedburner.com/~r/BrandonAaron/~3/137454949/</link>
		<comments>http://blog.brandonaaron.net/2007/07/25/dimensions-101/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 03:26:57 +0000</pubDate>
		<dc:creator>Brandon Aaron</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Dimensions]]></category>

		<category><![CDATA[jQuery Plugins]]></category>

		<guid isPermaLink="false">http://blog.brandonaaron.net/2007/07/25/dimensions-101/</guid>
		<description><![CDATA[I just released Dimensions 1.0.1. It fixes an issue with fixed position elements in Opera and makes it easier to run the test suite&#160;locally.
You can download the zip from the Dimensions project&#160;page.
]]></description>
			<content:encoded><![CDATA[<p>I just released Dimensions 1.0.1. It fixes an issue with fixed position elements in Opera and makes it easier to run the test suite&nbsp;locally.</p>
<p>You can download the zip from the <a href="http://jquery.com/plugins/project/dimensions">Dimensions project&nbsp;page</a>.</p>
<img src="http://feeds.feedburner.com/~r/BrandonAaron/~4/137454949" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.brandonaaron.net/2007/07/25/dimensions-101/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=BrandonAaron&amp;itemurl=http%3A%2F%2Fblog.brandonaaron.net%2F2007%2F07%2F25%2Fdimensions-101%2F</feedburner:awareness><feedburner:origLink>http://blog.brandonaaron.net/2007/07/25/dimensions-101/</feedburner:origLink></item>
		<item>
		<title>Dimensions 1.0</title>
		<link>http://feeds.feedburner.com/~r/BrandonAaron/~3/136308025/</link>
		<comments>http://blog.brandonaaron.net/2007/07/22/dimensions-10/#comments</comments>
		<pubDate>Sun, 22 Jul 2007 23:11:55 +0000</pubDate>
		<dc:creator>Brandon Aaron</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Dimensions]]></category>

		<category><![CDATA[jQuery Plugins]]></category>

		<guid isPermaLink="false">http://blog.brandonaaron.net/2007/07/22/dimensions-10/</guid>
		<description><![CDATA[Dimensions 1.0 is final! This is a very big release for Dimensions and includes a lot of bug fixes, new features, an automated test suite and docs. Yup, even docs! So what new features have been added to Dimensions in&#160;1.0?


A position method to get the positioned&#160;offset.
An offsetParent method to get the positioned&#160;parent.
The scrollTop and scrollLeft [...]]]></description>
			<content:encoded><![CDATA[<p>Dimensions 1.0 is final! This is a very big release for Dimensions and includes a lot of bug fixes, new features, <a href="http://brandonaaron.net/jquery/plugins/dimensions/test/unit.html">an automated test suite</a> and <a href="http://brandonaaron.net/docs/dimensions/">docs</a>. Yup, even <a href="http://brandonaaron.net/docs/dimensions/">docs</a>! So what new features have been added to Dimensions in&nbsp;1.0?</p>
<p><span id="more-38"></span></p>
<ul>
<li>A <a href="http://brandonaaron.net/docs/dimensions/#api-position"><code>position</code></a> method to get the positioned&nbsp;offset.</li>
<li>An <a href="http://brandonaaron.net/docs/dimensions/#api-offsetParent"><code>offsetParent</code></a> method to get the positioned&nbsp;parent.</li>
<li>The <a href="http://brandonaaron.net/docs/dimensions/#api-scrollTop"><code>scrollTop</code></a> and <a href="http://brandonaaron.net/docs/dimensions/#api-scrollLeft"><code>scrollLeft</code></a> methods can now set the value as well as get the value of the scroll&nbsp;offsets.</li>
<li>The <a href="http://brandonaaron.net/docs/dimensions/#api-offset"><code>offset</code></a> method has some new options:
<ul>
<li>A <code>relativeTo</code> option that provides a way to get the offset relative to a parent&nbsp;element.</li>
<li>A <code>lite</code> option that provides a very fast way to get the offset but at the price of accuracy when borders and margins are&nbsp;involved.</li>
</ul>
</li>
</ul>
<p>Lots of testing has gone into the 1.0 release and lots of bugs have been fixed and browser issues have been normalized. For example, Firefox and Opera include the width of the scroll bar when getting the width/height of the window unlike the other browsers. This issue has been normalized in Dimensions and you can count on getting accurate results&nbsp;cross-browser.</p>
<h3>An&nbsp;Example</h3>
<p>The Dimensions plugin is built to get accurate results and stay out of your way. For example the <a href="http://brandonaaron.net/docs/dimensions/#api-position"><code>position</code></a> method returns an object with a top and left property. This allows us to pass the result directly to the <code>css</code>. Lets say we wanted to make a static element positioned absolute but so that it stays exactly where it was when&nbsp;static.</p>
<div class="syntax_hilite">
<div id="javascript-16">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> css = <span style="color: #66cc66;">&#123;</span> position: <span style="color: #3366CC;">'absolute'</span> <span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'#myElement'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">position</span><span style="color: #66cc66;">&#40;</span>css<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">css</span><span style="color: #66cc66;">&#40;</span>css<span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>With just two simple lines of code we can make an element absolutely positioned! In this example I took advantage of the ability to pass in an object to the position method so that I could continue the jQuery chain. I plan on writing about more ways to use the dimensions plugin. So be sure to grab the <a href="http://blog.brandonaaron.net/feed/"><span class="caps">RSS</span> feed</a> (if you haven't already) to stay&nbsp;up-to-date!</p>
<h3>Get Dimensions&nbsp;1.0</h3>
<p>The Dimensions plugin can be downloaded from the <a href="http://jquery.com/plugins/project/dimensions">Dimensions project page</a>. The zip contains the full source, a minified version and a packed version. You can also grab the latest from <span class="caps">SVN</span>&nbsp;<a href="http://jqueryjs.googlecode.com/svn/trunk/plugins/dimensions/">http://jqueryjs.googlecode.com/svn/trunk/plugins/dimensions/</a>.</p>
<h3>Support, Bugs and Feature&nbsp;Requests</h3>
<p>The <a href="http://jquery.com/plugins/project/dimensions">Dimensions project page</a> has a place to report bugs, issues and request&nbsp;features.</p>
<img src="http://feeds.feedburner.com/~r/BrandonAaron/~4/136308025" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.brandonaaron.net/2007/07/22/dimensions-10/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=BrandonAaron&amp;itemurl=http%3A%2F%2Fblog.brandonaaron.net%2F2007%2F07%2F22%2Fdimensions-10%2F</feedburner:awareness><feedburner:origLink>http://blog.brandonaaron.net/2007/07/22/dimensions-10/</feedburner:origLink></item>
		<item>
		<title>Dimensions 1.0rc1</title>
		<link>http://feeds.feedburner.com/~r/BrandonAaron/~3/130176361/</link>
		<comments>http://blog.brandonaaron.net/2007/07/01/dimensions-10rc1/#comments</comments>
		<pubDate>Mon, 02 Jul 2007 02:10:09 +0000</pubDate>
		<dc:creator>Brandon Aaron</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Dimensions]]></category>

		<category><![CDATA[jQuery Plugins]]></category>

		<guid isPermaLink="false">http://blog.brandonaaron.net/2007/07/01/dimensions-10rc1/</guid>
		<description><![CDATA[Hot on the heels of the jQuery 1.1.3 release, here is Dimensions 1.0 release candidate 1! Dimensions 1.0rc1 includes several key new&#160;features.

A new method, called position, to get the positioned offset of an&#160;element
A new lite option to the offset method that runs much&#160;faster
The offset method now works on the body&#160;element
The scrollTop and scrollLeft methods are [...]]]></description>
			<content:encoded><![CDATA[<p>Hot on the heels of the <a href="http://jquery.com/blog/2007/07/01/jquery-113-800-faster-still-20kb/">jQuery 1.1.3 release</a>, here is Dimensions 1.0 release candidate 1! Dimensions 1.0rc1 includes several key new&nbsp;features.</p>
<ul>
<li>A new method, called position, to get the positioned offset of an&nbsp;element</li>
<li>A new lite option to the offset method that runs much&nbsp;faster</li>
<li>The offset method now works on the body&nbsp;element</li>
<li>The scrollTop and scrollLeft methods are now setters and&nbsp;getters</li>
<li>A new test&nbsp;suite</li>
<li>Updated&nbsp;documentation</li>
<li>And lots of bug&nbsp;fixes</li>
</ul>
<p>Still to come are more documentation and examples! You can grab Dimensions 1.0rc1 from the <a href="http://jquery.com/plugins/project/dimensions">Dimensions project&nbsp;page</a>.</p>
<img src="http://feeds.feedburner.com/~r/BrandonAaron/~4/130176361" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.brandonaaron.net/2007/07/01/dimensions-10rc1/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=BrandonAaron&amp;itemurl=http%3A%2F%2Fblog.brandonaaron.net%2F2007%2F07%2F01%2Fdimensions-10rc1%2F</feedburner:awareness><feedburner:origLink>http://blog.brandonaaron.net/2007/07/01/dimensions-10rc1/</feedburner:origLink></item>
	<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetFeedData?uri=BrandonAaron</feedburner:awareness></channel>
</rss>
