In jQuery, why does this:
$('<div open="whatever">').attr('open')
Always evaluate to 'open'
instead of 'whatever'
? In contrast, this:
$('<div asdf="whatever">').attr('asdf')
Evaluates to 'whatever'
as expected.
Yes, I am aware that open
and asdf
are not valid HTML attributes; I'm not looking for answers that say something along the lines of "just use data-open
", etc... I am looking for an explanation of the above behavior.