<?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>Jon Allured</title>
	<atom:link href="http://www.jonallured.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jonallured.com</link>
	<description>Geeky web developer, standards advocate and picky web surfer</description>
	<lastBuildDate>Wed, 30 Dec 2009 17:35:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Quicksilver on Snow Leopard</title>
		<link>http://www.jonallured.com/archives/17</link>
		<comments>http://www.jonallured.com/archives/17#comments</comments>
		<pubDate>Wed, 30 Dec 2009 17:35:58 +0000</pubDate>
		<dc:creator>Jon Allured</dc:creator>
				<category><![CDATA[quicksilver]]></category>

		<guid isPermaLink="false">http://www.jonallured.com/?p=17</guid>
		<description><![CDATA[The trick to installing Quicksilver on Snow Leopard.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been lost and sad ever since I upgraded to Snow Leopard and couldn&#8217;t run <a href="http://docs.blacktree.com/quicksilver/what_is_quicksilver">Quicksilver</a>, so I spent a little time today poking around and found <a href="http://groups.google.com/group/blacktree-quicksilver/browse_thread/thread/8432fc6538d2d778">this post</a> in Quicksilver&#8217;s Google Group that talks about how you can get it to work.  Looks like all you have to do is run a beta version and the post identifies a particular preference file that you should delete &#8211; I had to actually delete the entire Quicksilver folder (~/Library/Application Support/Quicksilver) in order to even get it to open.  This was the trick for me.  I had installed this version before, but when I fired it up, nothing would happen.  I had to actually delete this entire folder before it would do anything.</p>
<p>But now Quicksilver is back and running on my machine and I&#8217;m very happy!  Quicksilver is such an important part of my UI that I was really annoyed that I couldn&#8217;t run it anymore and really disheartened to find out that Blacktree hasn&#8217;t addressed this issue.  In fact, from what I can tell, they aren&#8217;t actively developing Quicksilver anymore and its been taken over by a group of developers that have moved it over to a <a href="http://github.com/tiennou/blacktree-alchemy">GitHub repo</a>.</p>
<p>If you&#8217;ve never used Quicksilver, I strongly encourage you to check it out &#8211; its a really nice application launcher that goes way beyond that one feature to change how you interact with your computer.  If you prefer to keep your hands off the mouse and on the keyboard, you&#8217;ll love Quicksilver.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonallured.com/archives/17/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding the mouse position when an event fires</title>
		<link>http://www.jonallured.com/archives/1</link>
		<comments>http://www.jonallured.com/archives/1#comments</comments>
		<pubDate>Fri, 25 Dec 2009 14:34:53 +0000</pubDate>
		<dc:creator>Jon Allured</dc:creator>
				<category><![CDATA[firebug]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.jonallured.com/wordpress/?p=1</guid>
		<description><![CDATA[How to work with the event object in jQuery to determine the mouse coordinates and a clever technique to keep a scrolling div scrolled all the way down to the bottom.]]></description>
			<content:encoded><![CDATA[<p>We recently had a project where we needed to find out where the mouse was (its coordinates) when an event fired (hover). I wanted to create a little <a href="http://files.jonallured.com/examples/mouse_position.html">example page</a> that I could play around with to see how this worked.</p>
<p>The markup is really simple and just creates four divs in red &#8211; on <code>over</code> their background color is changed to green and then its changed back on <code>out</code>.  We&#8217;re using jQuery here, so the syntax is based on the <a href="http://docs.jquery.com/Events/hover">hover documentation</a> and the solution as inspired by their <a href="http://docs.jquery.com/Tutorials:Mouse_Position">Mouse Position tutorial</a>.</p>
<p>The magic is really just the bit where you define the hover functions and then the <code>pageX</code> and <code>pageY</code> attributes of <code>e</code>:</p>
<pre><code>$('div.block').hover(
   function (e) {
      ...
      var msg = 'ON! x=' + e.pageX + ', y=' + e.pageY;
      ...
   },
   function (e) {
      ...
      var msg = 'OFF! x=' + e.pageX + ', y=' + e.pageY;
      ...
   }
);</code></pre>
<p>If you pass the hover functions a variable, it will give you access to the <code><a href="http://docs.jquery.com/Events/jQuery.Event">event object</a></code> through which you can determine the mouse&#8217;s position by using its <code>pageX</code> and <code>pageY</code> attributes &#8211; slick, huh?</p>
<p>So, I really liked this and wanted to see it in action &#8211; I thought <a href="http://getfirebug.com/console.html">logging the info to the FireBug console</a> would be a nice way to see it, but later I realized that I wanted to run this code in other browsers (IE), so I made my own console div and then wrote the coordinates to it.</p>
<p>When I tested this out, however, I didn&#8217;t like that I had to keep scrolling the div to the bottom, so I found a <a href="http://radio.javaranch.com/pascarello/2005/12/14/1134573598403.html">nice technique</a> to keep it at the bottom:</p>
<pre><code>function (e) {
   ...
   var consoleDiv = document.getElementById('console');
   consoleDiv.scrollTop = consoleDiv.scrollHeight;
}</code></pre>
<p>The <code>div</code> element&#8217;s <code>scrollTop</code> is set to its <code>scrollHeight</code> so that it will remain scrolled to the bottom as its size grows. I had never heard of these attributes, but they are nicely documented in Mozilla&#8217;s Developer Center: <a href="https://developer.mozilla.org/en/DOM/element.scrollTop"><code>scrollTop</code></a>, <a href="https://developer.mozilla.org/en/DOM/element.scrollHeight"><code>scrollHeight</code></a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonallured.com/archives/1/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
