Skip to main content

Bug Tracker

Side navigation

#8326 closed bug (duplicate)

Opened February 19, 2011 06:59PM UTC

Closed February 19, 2011 07:50PM UTC

Last modified February 20, 2011 01:37PM UTC

Camelize problem with jQuery.fn.data()

Reported by: calvein@gmail.com Owned by:
Priority: high Milestone: 1.next
Component: data Version: 1.5
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

I've made a fiddle to explain the problem. In fact, when you do $(el).data() you will get an object with the datas.

If I have this : <el data-foo-bar="test">

$('el').data().fooBar will not work ($('el').data()['foo-bar'] will work) but in plain JS document.getElementsByTagName('el')[0].dataset.fooBar works.

http://jsfiddle.net/Calou/dJNES/

Attachments (0)
Change History (3)

Changed February 19, 2011 07:50PM UTC by snover comment:1

resolution: → duplicate
status: newclosed

Changed February 19, 2011 07:50PM UTC by snover comment:2

Duplicate of #7328.

Changed February 20, 2011 01:37PM UTC by jitter comment:3

component: unfileddata
priority: undecidedhigh