Reputation: 148524
http://jsbin.com/uremuc/2/edit
If I'm choosing jquery 1.5.2 in jsBin ,
running .attr('tagName')
should return me undefined ( or something else but not the real result) since its not suppose to read the dom element as Prop does.
So why is it working ? It doesnt suppose to be working...
Upvotes: 0
Views: 89
Reputation: 3830
For example,
selectedIndex
,tagName
,nodeName
,nodeType
,ownerDocument
,defaultChecked
, anddefaultSelected
should be retrieved and set with the.prop()
method. Prior to jQuery 1.6, these properties were retrievable with the.attr()
method, but this was not within the scope ofattr
. These do not have corresponding attributes and are only properties.
From jquery.com's .prop()
page
Upvotes: 3