Attributes provide additional information about HTML elements. jQuery have built-in methods that allow you to get and set DOM attributes of elements.
Attributes provide additional information about HTML elements.
- HTML elements can have attributes
- Attributes provide additional information about an element
- Attributes are always specified in the start tag
- Attributes come in name/value pairs like: name="value"
jQuery have built-in methods that allow you to get and set DOM attributes of elements. Some of the useful jQuery attributes manipulation methods are:
- .attr()- Get the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element.
- .removeAttr()- Remove an attribute from each element in the set of matched elements.
 
     
     
     
     
     
     
     
     
     
     
     I'm changing the image through jQuery:
$('#man_img_file').attr('src', "images/image_02.gif");
Now I want to display a…
I'm changing the image through jQuery:
$('#man_img_file').attr('src', "images/image_02.gif");
Now I want to display a… 
     
     
    