[jQuery] Re: How to access href-property

2008-12-05 Thread Eric Martin
What about: $(#idOfAnAnchor1)[0].href; On Dec 5, 8:10 am, Matthias Coy [EMAIL PROTECTED] wrote: Hi there, how do I access the href-property of an anchor-element? I know there is a $(#idOfAnAnchor).attr(href); but this only gives me the attribute and not the property. I need the

[jQuery] Re: How to access href-property

2008-12-05 Thread Andy Matthews
Matthias... Attr('href') will give you whatever is contained in the href property. If you want the http://otherpage.com; then that needs to be contained in the href property. Using the 'domain' property of the document object will give you the first part: script type=text/javascript

[jQuery] Re: How to access href-property

2008-12-05 Thread Andy Matthews
Here's a reference URL by the way: http://www.hscripts.com/tutorials/javascript/document-object.php On Dec 5, 10:21 am, Andy Matthews [EMAIL PROTECTED] wrote: Matthias... Attr('href') will give you whatever is contained in the href property. If you want the http://otherpage.com; then that

[jQuery] Re: How to access href-property

2008-12-05 Thread Andy Matthews
As an FYI, while I personally prefer relative URLs for simplicity and code reuse, full URLs in the HREF attribute provide slightly better SEO due to the replication of the domain name. On Dec 5, 10:23 am, Andy Matthews [EMAIL PROTECTED] wrote: Here's a reference URL by the way:

[jQuery] Re: How to access href-property

2008-12-05 Thread Michael Geary
Is that really true? A crawler has to convert all relative URLs to their full form in order to get to those pages. So it has the exact same full URL on hand whether the HTML has a full or relative URL. I don't have any hard evidence one way or the other, it just seems surprising that a search

[jQuery] Re: How to access href-property

2008-12-05 Thread Karl Swedberg
Not sure about that, but one advantage of full URLs is that they work in all feed readers. I was using root-relative URLs on my blog until somebody complained that these links wouldn't work for him in his feed reader. --Karl On Dec 5, 2008, at 11:29 AM, Andy Matthews wrote: As an FYI,

[jQuery] Re: How to access href-property

2008-12-05 Thread Andy Matthews
-en@googlegroups.com Subject: [jQuery] Re: How to access href-property Is that really true? A crawler has to convert all relative URLs to their full form in order to get to those pages. So it has the exact same full URL on hand whether the HTML has a full or relative URL. I don't have any hard

[jQuery] Re: How to access href-property

2008-12-05 Thread brian
I'd say that's a broken feed-reader. On Fri, Dec 5, 2008 at 12:46 PM, Karl Swedberg [EMAIL PROTECTED] wrote: Not sure about that, but one advantage of full URLs is that they work in all feed readers. I was using root-relative URLs on my blog until somebody complained that these links wouldn't

[jQuery] Re: How to access href-property

2008-12-05 Thread Karl Swedberg
Yeah, that's what I would say, too. The person who mentioned it said it affects feedburner and google reader. I can neither confirm nor deny that claim, though. cf.