This lesson mainly talked about messing with the html using JQuery
- $(document).ready(function() {
$("#text").click(function() {
$(this).addClass("highlighted")
});
}); - For example this function adds a class to text which adds CSS to it giving it a highlighted effect(removeClass does the opposite)
- $(document).ready(function () {
$("body").append("<p>I'm a paragraph!</p>");
}); - This simply adds a paragraph to the end of the body, alternatively prepend would put it at the start
- remove gets rid of an element completely while empty gets rid of its contents
I'm determined to get .toggleClick working. Please:
ReplyDelete1. Point me to the source files you are using that are not working.
2. Describe the desired behavior you want the page to have.
I'll take a look at it while I'm in Montreal.