Ok so I want to pass a very basic array into a jquery data attrubute server side like so:
<div data-stuff="['a','b','c']"></div>
and then retreive like so:
var stuff = $('div').data('stuff');
alert(stuff[0]);
Why does this appear to alert '[' and not 'a' (see JSfiddle link)
JSFiddle Link : http://jsfiddle.net/ktw4v/3/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…