It is most likely an issue with selecting the a tag by the href attribute. Sometimes the href attribute gets serialized by IE. Try using the $= attribute selector ( http://docs.jquery.com/Selectors/attributeEndsWith#attributevalue ) to find that a tag.
$('#mainMenu ul li ul li a[href$="' + href + '"]').triggerHandler('click'); -- Brandon Aaron On Thu, Nov 13, 2008 at 9:13 PM, n00bert <[EMAIL PROTECTED]> wrote: > > > Hi, > > I have the following code: > > //link is loaded via ajax into a div in #content > > //when clicked find a link in #mainMenu with the same href and > trigger a > click on it > $('#content div.thumb a').livequery('click', function(e) { > e.preventDefault(); > var href = $(this).attr('href'); > $('#mainMenu ul li ul li a[href="' + href + > '"]').triggerHandler('click'); > return false; > }); > > //some code for what happens when a menu link is clicked > > which works well in Safari 3, Firefox 3, Opera 9 on both win and mac. > However, in ie6 and ie7 I'm guessing the click event is never bound because > nothing happens if the link in a div in #content is clicked. > > Can someone shed some light on this please? Perhaps internet explorer is > not > recognising the selector which has a variable in it? Or is it a livequery > issue? > > I'm stumped. Thanks for any help, > > Sameer > -- > View this message in context: > http://www.nabble.com/livequery-not-binding-to-ajax-loaded-links-in-ie6-and-ie7--tp20494001s27240p20494001.html > Sent from the jQuery General Discussion mailing list archive at Nabble.com. > >