Skip to main content

Bug Tracker

Side navigation

#11228 closed bug (invalid)

Opened January 26, 2012 09:52AM UTC

Closed January 26, 2012 10:11AM UTC

Type for Select element return Undefined

Reported by: dmitryv@e1.ru Owned by:
Priority: low Milestone: None
Component: core Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

<select id='testselect'>

...

$('#testselect').type

return 'undefined' but must be select, or select-one, or select-multiple

http://dev.w3.org/html5/spec/the-select-element.html#dom-select-type

document.getElementById('testselect').type

return correct

Attachments (0)
Change History (1)

Changed January 26, 2012 10:11AM UTC by sindresorhus comment:1

component: unfiledcore
priority: undecidedlow
resolution: → invalid
status: newclosed

Thanks for taking the time to contribute to the jQuery project! In the future, please include a testcase on jsfiddle.

The jQuery object does not include DOM element properties. You can easily access those using:

$('#testselect')[0].type