onclick - JQuery capturing click event on nested a tag in li -
i'm having problem capturing jquery onclick event on nested tag within ul
<ul class="paginate"> <li>>1</li> <li> <a href="http://www.xxx.co.uk/xxx/" onclick="ajaxpage('2',true,'left'); homecoming false;">2</a>
i've tried number of ways capture if user clicks on tag, nil seems work;
$('.paginate li').click(function(){ alert('caught page'); }); $('ul.paginate li').click(function(){ alert('caught page'); }); $('.paginate li a').click(function(){ alert('caught page'); });
can help?
$(document).ready(function() { $('ul.paginate li').click(function(e) { alert('caught page'); }); }
jquery onclick
No comments:
Post a Comment