jQuery .data() is initially populated with values from the data-
attributes, but setting it only stores the associated new value in memory. It doesn't change the attribute in the DOM. To change the attribute, you have to use:
$('#one, #three').attr('data-test', 'changed');
The docs are at http://api.jquery.com/jQuery.data/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…