On Jul 25, 2007, at 1:11 AM, oliver wrote: > > Then I'd try $('[EMAIL PROTECTED]').filter('[EMAIL PROTECTED]') > > 'select all links (with hrefs) and remove those that contain > mysite.com'
Actually, Joel's version is correct. Yours *keeps* those that contain mysite.com, removing the others. > $('a').not('[EMAIL PROTECTED]') Not sure which way is faster, but this should also work: $('a:not([EMAIL PROTECTED])') Also, IIRC, [EMAIL PROTECTED] gets the actual value of the href attribute, which can be different from what element.href gets, depending on the browser (one of the browsers always returns the fully qualified URL for element.href, including "http..."). So, if you don't actually have "mysite.com" in the href attribute, it won't work. Hope that makes sense. --Karl _________________ Karl Swedberg www.englishrules.com www.learningjquery.com > > o > >> I want to reformat all the links that DONT point to my site. >> >>> Instead of using $('a.redir'), try using $('[EMAIL PROTECTED]') > > > >