Using data attributes with jQuery

后端 未结 4 1915
我寻月下人不归
我寻月下人不归 2020-12-03 03:19

I have this button:

4条回答
  •  独厮守ぢ
    2020-12-03 04:02

    The problem is the camel case. For clarity I'd stick to the data-theme-value format for your attributes.

    http://jsfiddle.net/NkHEx/2/

    jquery automatically converts .data('some-value') to data('someValue')

    Note that both alert calls return grid

提交回复
热议问题