<!doctype html> <head> <title>Mobile-Web-App: jQuery .bind()/.unbind()</title> <meta charset="utf-8"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> <script> $(document).ready(function(){ $("#clickme").bind('click', (function(){ alert("'clickme' Clicked! and unbind."); $("#clickme").unbind('click'); })); }); </script> </head> <body> <p><b>Mobile-Web-App: jQuery .bind()/.unbind()</b></P> <p id="clickme">Click Me (accept one time only)</p> </body> </html>
Related:
- jQuery .click() - click event handler
- Handle event using .bind() in jQuery
- Handle event using .live() in jQuery
No comments:
Post a Comment