<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
	<channel>
		<title>Advanced keypress navigation with jQuery</title>
		<description>Advanced keypress navigation with jQuery</description>
		<link>http://www.marcofolio.net</link>
		<lastBuildDate>Sat, 21 Nov 2009 02:06:48 +0100</lastBuildDate>
		<generator>FeedCreator 1.7.2</generator>
		<item>
			<title>Not working for me</title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc8376</link>
			<description>Hi Marco,

Just thought I\'d let you know that your demo on partially works for me on an Intel MacBook Pro (mid-2009) with OS X 10.5.7 and Safari 4.0.1. Enter key works, navigation by mouse works, but the arrow keys on my built-in or attached keyboard do nothing. Arrow keys do work for me in Firefox 3.5 for Mac however.</description>
			<author>Bruce</author>
			<pubDate>Mon, 06 Jul 2009 10:12:17 +0100</pubDate>
		</item>
		<item>
			<title>Fix</title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc8377</link>
			<description>Hi Bruce! First, thanks for your comment.

I checked and you\'re totally right. I did find it strange, because I want 100% positive it worked on Safari before.

After some Googling, I found out why it stopped working. Check out the following code:
[quote]$(document).keypress(function(e) {[/quote]
For some reason, when \&quot;keypress\&quot; is used, Safari can\'t retrieve the keyCode for the arrow keys. This is how the function looked before and does work on Safari:
[quote]$(document).keydown(function(e) {[/quote]
When using \&quot;keydown\&quot;, it does work fine on Safari.

The downside of \&quot;keydown\&quot; is, that when you hold the arrow key, it doesn\'t move to the next object. That\'s why I changed it to \&quot;keypress\&quot;.

Anyway, thanks for noticing and I hope you can work with the fix!</description>
			<author>Marco</author>
			<pubDate>Mon, 06 Jul 2009 10:36:14 +0100</pubDate>
		</item>
		<item>
			<title>A potential optimization</title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc8391</link>
			<description>Good stuff.  I like how you handled several things.

By way of optimization, you could supplant your use of .data for [url=http://docs.jquery.com/Core/index#subject].index[/url].  That is, in place of this code:
[quote]currentSelection = $(this).data(\&quot;number\&quot; );[/quote]
You could use:
[quote]var currentSelection = $(\&quot;#menu ul li a\&quot; ).index(this);[/quote]
This would also allow you to completely remove this code:
[quote]for(var i = 0; i &lt; $(\&quot;#menu ul li a\&quot; ).size(); i++) {
	$(\&quot;#menu ul li a\&quot; ).eq(i).data(\&quot;number\&quot;, i);
}[/quote]
The gains are that you are using native jQuery functions and that you keep the data object namespace clear of potential conflicts (particularly since \&quot;number\&quot; could be a popular one).

Just an idea - but nicely done!</description>
			<author>Nathan Logan</author>
			<pubDate>Mon, 06 Jul 2009 21:19:59 +0100</pubDate>
		</item>
		<item>
			<title>Good thinking, thanks!</title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc8393</link>
			<description>Hi Nathan! First off, thanks for your comment, feedback and compliment.

You\'re totally right, that would absolutely be much prettier. I wasn\'t aware of the \&quot;.index\&quot; method (still learning jQuery every day, getting to know it better and better ;) ), so thanks for letting me know. All I knew is that I needed the \&quot;index\&quot; and I placed it in the \&quot;data\&quot;, instead of using the (native) \&quot;index\&quot; function.

Anyhow, learned something new (again) today; Thanks a lot!</description>
			<author>Marco</author>
			<pubDate>Mon, 06 Jul 2009 21:26:48 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc8416</link>
			<description>Very nice tutorial. I will definitely keep this in mind. Thanks for sharing.</description>
			<author>Raymond Selda</author>
			<pubDate>Tue, 07 Jul 2009 14:39:20 +0100</pubDate>
		</item>
		<item>
			<title>Its not wokring in IE</title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc8776</link>
			<description>Hi 

I am not able to run this key press navigation in IE, i am using IE 7. Please help me to figure out this issue.


Qamer</description>
			<author>Qamer</author>
			<pubDate>Fri, 17 Jul 2009 08:35:12 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc8910</link>
			<description>Hmm, it might not work on IE, but others is OK. Thanks for the tip.</description>
			<author>Phaoloo</author>
			<pubDate>Sun, 19 Jul 2009 14:51:12 +0100</pubDate>
		</item>
		<item>
			<title>Great Work</title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc9906</link>
			<description>Thanks for this example,using it i modified fancy apple.com style suggestion so it is now supports keyboard.
I had some problems with addclass. Don\'t know why when class was dynamically added to suggestions div there was no style change. Instead of adding style i used changing css property.</description>
			<author>TKF</author>
			<pubDate>Sat, 08 Aug 2009 00:50:24 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc9908</link>
			<description>For me example also didn\'t work in IE6. I modified it, if you use keyup instead of keydown it will work fine in IE. But as Marco said if you hold the key nothing will happen.</description>
			<author>TKF</author>
			<pubDate>Sat, 08 Aug 2009 00:59:50 +0100</pubDate>
		</item>
		<item>
			<title>Very Nice</title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc12799</link>
			<description>I like it! Very nice - keep going !</description>
			<author>Jannis Gerlinger</author>
			<pubDate>Mon, 02 Nov 2009 14:22:24 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc12874</link>
			<description>How do I enable the first item of my list to have the .itemhover? I tried this line of code prior to the start of the functions, but it didn\'t work (using FF3.5):

[code]$(\&quot;#menu ul li a:first\&quot;).addClass(\&quot;itemhover\&quot;);[/code]</description>
			<author>JB</author>
			<pubDate>Wed, 04 Nov 2009 22:23:26 +0100</pubDate>
		</item>
		<item>
			<title>code</title>
			<link>http://www.marcofolio.net/webdesign/advanced_keypress_navigation_with_jquery.html#josc12995</link>
			<description>I\'ve failed to modify the previous code for apple style suggestion with this one. Could you provide the code you wrote? Thanks!</description>
			<author>Mariano</author>
			<pubDate>Fri, 06 Nov 2009 08:13:28 +0100</pubDate>
		</item>
	</channel>
</rss>
