I don't know if it'll work 'cause you didn't post any XHTML, but you could give this try:
if ('http://example.com/foo/bar.html' === $('a', $(this)).attr('href')) { alert('Hooray!'); } PS: avoid using == and !=, instead use === and !== On Wed, Jul 8, 2009 at 11:09, brightdad...@googlemail.com<brightdad...@googlemail.com> wrote: > > Hi Experts, > > I am trying to conditionally test what the value of href is equal to. > > like this; > > if($(this).find('a').attr("href")=="map.html"){ > alert("yes"); > } > > This doesn't work. Do anyone knows what i am doing wrong. > > Psuedocode please. -- Massimo Lombardo Linux user #437712