如何在引導框架中更改按鈕的css顏色屬性? 例如,我的一個按鈕...更改按鈕的css顏色屬性
<button type="button" id="button1" class="btn btn-primary btn-large" onclick="checkAnswer(0)">Some text</button>
一些jQuery的...
$(document).ready(function(){
// Wrong answer! The selected button turns red.
$("#button1").click(function(){
$("btn-primary").css("background-color", "red");
});
});
感謝。
請參閱本文以獲取完整說明。 http://stackoverflow.com/questions/13415030/twitter-bootstrap-2-custom-button-styling-not-working/13415671#13415671(有一些問題需要注意) – davidkonrad