2
如何重寫此代碼以更有效地使用jQuery更改類名?如何更有效地重寫這個jQuery?
$(function() {
$('#container').click(function(event) {
var element = event.currentTarget;
/* Toggle the setting of the classname attribute */
element.className = (element.className == 'card') ? 'card flipped' : 'card';
});
});
唉唉的風采! – jathanism 2010-08-24 19:36:15