Search and Top Navigation
#9053 closed bug (duplicate)
Opened February 04, 2013 09:11AM UTC
Closed February 07, 2013 01:44AM UTC
:data selector fails when value is falsy
Reported by: | linus.yan87 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.core | Version: | 1.8.20 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
We can use .data(key, value) to save 0 and null on element. But we can't get the element with :data selector. Because for 0 and null, !!data(ele, key) is !!0 and !!null, and they both return false. So it failed to get the elements.
Attachments (0)
Change History (3)
Changed February 04, 2013 02:07PM UTC by comment:1
status: | new → open |
---|---|
summary: | :data selector failed when value is 0 or null → :data selector fails when value is falsy |
Confirmed: http://jsfiddle.net/tj_vantoll/XrNXX/