Karl Swedberg schrieb:

On Apr 26, 2007, at 6:23 PM, Klaus Hartl wrote:


Karl Swedberg schrieb:
Hi Shelane,
Looks like you just forgot the $ or jQuery before the opening parenthesis. This should work:
var initlink = $('a', 'div.nav_one_selected').attr("href");
--Karl

This would still not work, but this:

var initlink = $('a', $('div.nav_one_selected')).attr("href");


six eyes are better than two ;-)


-- klaus

Huh? Why not?

Works for me. See it in action:

http://test.learningjquery.com/context.html

;-)


Wow! Thanks Karl, I always thought the context argument has to be a jQuery object or a DOM element... This is also what's documented in the API docs.

So: six eyes are two too much I guess :-)


-- Klaus




Reply via email to