I have a simple click and show, click and hide button, but when I click it, the page anchors at the top of the page. Is there anyway to prevent this? So that when I click th
You probably are binding this clicks to a tag which has a default action. To prevent this you can use another tag like or you can do this: $('#flagThis').click(function (event) { $('#reportThis').show("slow"); event.preventDefault(); }); 0 讨论(0) 查看其它5个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
$('#flagThis').click(function (event) { $('#reportThis').show("slow"); event.preventDefault(); });