Thanks jake and jake. turns out my main problem was that I needed to add an
a to the initial selector
$("a.prevnextbutton") instead of $(".prevnextbutton")
after switching that both of methods worked a charm.
Thanks!
On 2/13/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
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/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/