I am using JQuery for the AJAX and dynamic aspects of my web based learning platform. I like the fact that JQuery allows us to use CSS type selectors to select elements on the page to either manipulate them, add event handlers, or a host of other things. So, the code below intercepts clicks on all links and dynamically adds a new link when a link is clicked. <html> <head> <link rel="stylesheet" type="text/css" href="/site-media/al/style.css" /> <script type="text/javascript" src="./jquery-1.3.2.min.js"></script> </head> <body> <script type="text/javascript"> $(document).ready(function() { $("a").click(function() { $("ul#questions").append("<li><a href='#'>click me</a></li>"); }); }); </script> <div> ...
Write Awesome User Manuals and Tutorials for Software Products