jquery - Click event not being called on internal div -
i need write jquery code when click anywhere on div call event of jquery, , when click on specific item, within div, not call click event. class "testes" should not call click.
however, structure have use below, because specific jquery.
below code:
html:
<div class="tiles red"> <div class="live-tile" id="tile1" data-mode="flip"> <div> <div class="testes"><a class="full" href="#"><p>* cnae<br /></a></div>* cbo<br />* cid-10<br /></p> <span class="tile-title"><p>clique para voltar</p></span> </div> <div> <p>cadastros básicos</p> <span class="tile-title">back title</span> </div> </div> </div> jquery:
$(function () { $(".live-tile").click(function () { $(this).livetile('play'); }); }); thanks
try using event.stoppropagation():
$(function () { $(".live-tile").click(function () { $(this).livetile('play'); }); $(".testes").click(function (e) { e.stoppropagation(); }); });
Comments
Post a Comment