Hi Brandon, I put an alert in like so:
$('#content div.thumb a').livequery('click', function(e) { alert ('clicked'); e.preventDefault(); var href = $(this).attr('href'); $('#mainMenu ul li ul li a[href$="' + href + '"]').triggerHandler ('click'); return false; }); Safari, Firefox and Opera all show the alert when clicked. ie6 and ie7 do not. In firebug, there are no errors. Any clues? Sameer On Nov 14, 4:06 am, "Brandon Aaron" <[EMAIL PROTECTED]> wrote: > Well, to help debug the issue, try putting an alert within the click handler > to make sure the click event is being bound and it isn't livequery causing > the issue. > Are you getting any script errors on the page? > > -- > Brandon Aaron > > On Thu, Nov 13, 2008 at 10:04 PM, n00bert <[EMAIL PROTECTED]> wrote: > > > Hi Brandon, > > > thanks for your speedy reply. I added the $ as shown below. > > Unfortunately, ie still doesn't recognise the links added to #content > > as clickable. I know I'm pushing it, but do you have any other ideas > > as to why this should be? > > > Sameer > > > On Nov 14, 3:27 am, "Brandon Aaron" <[EMAIL PROTECTED]> wrote: > > > 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-i. > > .. > > > > Sent from the jQuery General Discussion mailing list archive at > > Nabble.com.