It looks like you've already worked this out, but another method to do this
would be to use the document.links object. It would go something like this:
$(document.links).filter(function() { return this.indexOf('http://') == 0;
}).addClass('external')
On 5/10/07, stef <[EMAIL PROTECTED]> wrote:
The first one is probably more "correct". It's "all a tags whose href
attribute starts with http://";, which is exactly what you asked for.
--Erik
On 5/10/07, stef <[EMAIL PROTECTED]> wrote:
your second solution worked perfectly, didnt try the first one.
thanks!!
On May 10, 3:10 pm, "Erik B
your second solution worked perfectly, didnt try the first one.
thanks!!
On May 10, 3:10 pm, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> Untested (and I haven't slept in a while):
>
> $('[EMAIL PROTECTED]"http://";]').addClass('external');
>
> Or more along the lines of what you were doing before:
Untested (and I haven't slept in a while):
$('[EMAIL PROTECTED]"http://";]').addClass('external');
Or more along the lines of what you were doing before:
$('a').filter(function() { return this.href.indexOf('http://') == 0;
}).addClass('external');
--Erik
On 5/10/07, stef <[EMAIL PROTECTED]>
4 matches
Mail list logo