jQuery to change all the links in the page

Posted by Bunny Rabbit on Stack Overflow See other posts from Stack Overflow or by Bunny Rabbit
Published on 2010-03-30T06:20:33Z Indexed on 2010/03/30 6:23 UTC
Read the original article Hit count: 221

Filed under:
 $(function(){
            $('a').each(function(){
                        var x=this.href;
                        this.href="www.somesitename.com/filter"+this.href;
                  });
         });

i wrote the above jQuery script to append some site name to all the links in the page but it's not working as expected.

© Stack Overflow or respective owner

Related posts about jQuery