jQuery click (only click) not working -
so here jquery code (as simple possible) :
$(document).ready(function(){ $("#test").click(function () { alert('works!'); }); }); and page:
<script type="text/javascript" src="jquery-1.6.4.min.js" ></script> <script type="text/javascript" src="test.js" ></script> <p id="test">ss</p> and funny thing, whatever put after click(), doesn't work, if use hide(), append() or whatever instead of click(), working. problem? i'm using smarty, simplified code little, because page included layout.tpl nevertheless; why click() function doesn't work?!
the problem getting css positioning of elements.
the div id menu stacked on div id strona former have given width 200px , position:absolute. click on text not working click on div further right of text working.
so in case if add
`position:absolute` to div strona, works expected.
check updated fiddle here.
Comments
Post a Comment