One Time Event Handlers using jQuery and ASP.NET

Most of the times the JavaScript event handlers attached with an element fire every time the event under consideration is raised. For example, if you wire a click event handler to the click event of a button then clicking that button will invoke the event handler function every time. At times, however, this behavior is undesirable. You can unsubscribe the click event handler when it gets executed the first time. That means you need to create event handlers that fire only one time. Luckily, jQuery provides an inbuilt way to accomplish this task - one() method.

http://www.binaryintellect.net/articles/73afbd2e-aad8-4571-b4de-48e9521f79a6.aspx

No Comments