Unobtrusive javascript with jquery - good 10 minute tutorial? -


i'm looking 10 minute introduction unobtrusive javascript using jquery. i'm new concept, , i'd see how event binding , such works.

as background, i'm looking "remove tag" system similar have here on so. looking @ source, didn't see js, img tag. makes me think there must external js that's binding click event. want know how that, , want tutorial shows me how!

i guess tutorials page on jquery homepage place start :)

simple example remove link have clicked on follows:

<html>  <head> <script type="text/javascript"   src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> <script type="text/javascript">     // execute script when dom has finished loading     $(document).ready(function() {         $('#removeme').click(function() {             // remove element has been target of event             $(this).remove();             // stop browser following link             return false;         });     }); </script> </head>  <body>   <p>     <a id="removeme" href="http://example.org">remove me</a>   </p> </body> </html> 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -