[jQuery] Can't understand why this won't work
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='colecao.html'],#homeMenu A
[href='colecao.html']").click(function(e){
alert('colecao');
pageTracker._trackPageview('/iphone/colecao');
})
$("#menuRowA[href='brindes.html'],#homeMenu A
[href='brindes.html']").click(function(e){
alert('brindes');
pageTracker._trackPageview('/iphone/brindes');
})
$("#menuRowA[href='rep.html']").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="modelos.php?col=sandalias"><img src="images/
colecao_tipoSandalia.png" alt="Conheça nossas sandálias" /></a>
<a href="modelos.php?col=peeptoe"><img src="images/
colecao_tipoPeepToe.png" alt="São diversos modelos para você
escolher" /></a>
<a href="modelos.php?col=sapatilhas"><img src="images/
colecao_tipoSapatilha.png" alt="Um modelo de sapatilha mais bonito que
o outro" /></a>
<a href="modelos.php?col=tamanco"><img src="images/
colecao_tipoTamanco.png" alt="Veja nossa linha de tamancos" /></a>
</div>
<div id="menu">
<div id="menuRow">
<div><a href="colecao.html"><img src="images/menu_btColecao.png"
alt="Conheça a coleção da Bottero" /></a></div>
<div><a href="brindes.html"><img src="images/menu_btBrindes.png"
alt="Baixe wallpapers para o seu iPhone" /></a></div>
<div><a href="rep.html"><img src="images/menu_btRepres.png"
alt="Veja nossos representantes" /></a></div>
</div>
</div>
TIA
Marcelo Wolfgang