On Mar 25, 2009, at 5:04 PM, Shane Riley wrote:

Thanks for the article link, but your proposed change isn't valid
JQuery, is it? My exact jQuery code to read in the value looks like
this:
pageID = $(this).attr("href");
Adding what you suggested to make it $(this)[0].attr("href") will not
do anything apart from force the link to be followed.

Well, no. I suggested using:

pageID = $(this)[0].attr;

This is plain JavaScript, rather than using jQuery's attr() function. As the article suggests, this works cross-browser.

I think I'm going to have to move the contents of href to rel instead.

Well, you could, but I wouldn't; this is not what the rel attribute is meant for. Besides, it would break the anchor when JavaScript is turned off.

Regards,
--
Martijn.

Reply via email to