Bug Tracker

Modify

Ticket #8326 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

Camelize problem with jQuery.fn.data()

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

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/

Change History

comment:1 Changed 2 years ago by snover

  • Status changed from new to closed
  • Resolution set to duplicate

comment:2 Changed 2 years ago by snover

Duplicate of #7328.

comment:3 Changed 2 years ago by jitter

  • Priority changed from undecided to high
  • Component changed from unfiled to data

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.