Quantcast
Channel: Web Duos » IE
Viewing all articles
Browse latest Browse all 5

Difference between jQuery .attr() and .prop()

$
0
0

jQuery 1.6 introduces .prop() function and separates DOM Attributes and Properties, it raised a lot of questions about the difference between .attr and .prop functions. Before going jQuery, let us understand DOM Attributes and Properties. See following line <input id="demo" type="text" value="TechBrij" /> Now, I changed text ‘TechBrij‘ to ‘jQuery‘ in textbox and see FireBug DOM Tab(select Show DOM Properties option in DOM tab dropdown) You see Property “value” is ‘jQuery‘, but Attribute “value” is still ‘TechBrij‘. Now you have […]

The post Difference between jQuery .attr() and .prop() appeared first on Web Duos.


Viewing all articles
Browse latest Browse all 5

Trending Articles