Use jQuery selectors and Manipulate DOM
Background: As you have seen in my earliar post, We discussed about the basics of jQuery . Also we have seen different ways to select different DOM elements based on different attributes and attribute values. Now we are going to have a look at different ways to manipulate the DOM. Reading & Writing: One of the basic need we have is to read/write the content of a DOM element. Content of an element is what we see in the bare eye within that element. jQuery provides 3 simple methods to get the content of an element. These are: val()// Reading value from the selected element val(param) //Writing value from the selected element text()//Reading text from the selected element text(param) //Writing text from the selected element html() //Reading html from the selected element html(param) //Writing html from the selected element Apparently value, text and html seems like the same thing but there is differences.Text is a textual (without ma...