jquery hasAttr checking to see if there is an attribute on an element
- by Mark
How do you check if there is an attribute on an element in jquery? Similar to hasClass but with attr?
For example,
if ($(this).hasAttr("name")) {
function etc()
}
Thanks.