我找了一段代碼,讓我改變點擊的對象的CSS,像這樣的CSS:如何操作當前對象的
//Click & Lock
$('.pix').click(function(){
if(questionLock==false){questionLock=true;
//correct answer
if(this.id==rnd){
$(this).css('border-color:green');
score++;
}
//wrong answer
if(this.id!=rnd){
$(this).css('border-color:red');
}
setTimeout(function(){changeQuestion()},1000);
}})
}
的感謝!這真的很有幫助! – Max 2014-11-03 16:29:59