this.href to get or set.
var h = this.href
h.replace...
this.href = h
should do the dirty work. getting it in 1 line might work too!
You probably know that you are better off not specifying the site in
your hrefs.... but even if you don't this.href comes up with the
resolved url, instead of what you had in the html.
On 2/13/07, Will <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to covert some links from pico search on a site into local links.
>
>
> I tried
> $(".prevnextbutton").each(function () {
> $(this).attr("href").replace("
> http://www.picosearch.com/cgi-bin/ts.pl?","/local/path")
> });
> I get this error: $(this).attr("href") has no properties
>
>
> and then I tried:
> $(".prevnextbutton").each(function () {
> link = $(this).attr("href");
> link =
> link.replace("http://www.picosearch.com/cgi-bin/ts.pl?
> ","/local/path");
> console.log(link);
>
> and I keep getting the error "link has no properties"
>
> I feel like this is fairly obvious but I can't for the life of me get it!
>
> Thanks for any help,
> Will
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
--
Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/