I just noticed that if I try to read an html5 data-*
attribute using .data
it will parse automatically, whereas reading the value using .attr
will not.
data-id="00123456"
Why is this the default behavior? I have certain objects whose fields are of numeric values within a string, e.g. "00123456" and not 123456.
Did I miss a jQuery changelog
memo or what?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…