I use jquery to bind a click event in my link element and binding a handler. But every time I refresh the page the registration of the handler in m开发者_如何学运维y link element keeps adding. Like for example, in a new load page, only one handler registered in the click but when I click the link again, it it will add another handler.
Please advise.
Many thanks.
$("#btn").click(function () {
$("#blck").slideToggle("fast", function(){
});
});
It seems to work fine. You must be withholding vital information:
http://jsfiddle.net/2A78D/
精彩评论