Hi, sorry my mistake, I've pasted the wrong part of the code :/ this is the relevant info: <div id="homeMenu"> <a href="" class="colecao"><img src="" alt="Conheça a coleção da Bottero" /></a> <a href="" class="brindes"><img src="" alt="Baixe wallpapers para o seu iPhone" /></a> <a href="" class="rep"><img src="" alt="Veja nossos representantes" /></a> </div> forget about the <div id="colecaoMenu"> Thanks for spotting this On 4/12/2008 16:17, MorningZ wrote: Your selector $("#homeMenu A.colecao").click(function(e){ alert('menu'); });says: give me all <a> tags with the class of "colecao" inside the object 'homeMenu' but inside the HTML you show, there is no object with the ID of "homeMenu", nor are there any <a> tags with a class of "colecao", so the selector would bring back nothing to attach the event to On Dec 4, 12:15 pm, Marcelo Wolfgang <[EMAIL PROTECTED]> wrote:Hi all, I'm developing an iphone oriented site, and I'm having some problem with the click event not firing ( and I think is mine selectors who are wrong ) can anyone help me figure out? Heres the jscript: $("#homeMenu A.colecao").click(function(e){ alert('menu');}); $("#brindesMenu, #colecaoMenu, #repMenu").toggleClass('hide'); // this works $("#menuRowA[href=''],#homeMenu A [href='']").click(function(e){ alert('colecao'); pageTracker._trackPageview('/iphone/colecao');}) $("#menuRowA[href=''],#homeMenu A [href='']").click(function(e){ alert('brindes'); pageTracker._trackPageview('/iphone/brindes');}) $("#menuRowA[href='']").click(function(e){ // tried this to see if the problem was the multiple selectors alert('representantes'); pageTracker._trackPageview('/iphone/representantes'); }) heres the html: <div id="colecaoMenu" class="hide"> <a href=""><img src="" alt="Conheça nossas sandálias" /></a> <a href=""><img src="" alt="São diversos modelos para você escolher" /></a> <a href=""><img src="" alt="Um modelo de sapatilha mais bonito que o outro" /></a> <a href=""><img src="" alt="Veja nossa linha de tamancos" /></a> </div> <div id="menu"> <div id="menuRow"> <div><a href=""><img src="" alt="Conheça a coleção da Bottero" /></a></div> <div><a href=""><img src="" alt="Baixe wallpapers para o seu iPhone" /></a></div> <div><a href=""><img src="" alt="Veja nossos representantes" /></a></div> </div> </div> TIA Marcelo Wolfgang |
- [jQuery] Can't understand why this won't work Marcelo Wolfgang
- [jQuery] Re: Can't understand why this won't work MorningZ
- [jQuery] Re: Can't understand why this won't wor... Marcelo Wolfgang