$('#something').data('foo',52); alert($('#something').data('foo'));
您可以通过console.log($(‘#something’).data())查看对象的数据;
演示:http://jsfiddle.net/maniator/pQybU/