js学习
使用js改变css 选取器可以为button class 活着ID
<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$(".well").addClass("animated shake");
$("#target3").addClass("animated fadeOut");
});
</script>
改变css和各种
<script>
$(document).ready(function() {
$("#target1").css("color", "red"); 改变字体颜色
$("#target1").prop("disabled", true); 消除按钮效果
$("#target4").html("<em>#target4</em>"); 强调文本
});
</script>
<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove(); 移除一个元素
$("#target2").appendTo("#right-well"); 从一个div移动到另一个div
$("#target5").clone().appendTo("#left-well"); 克隆到另外一个div
$("#target1").parent().css("background-color", "red") 改变父元素的css
$("#right-well").children().css("color", "orange")
});
</script>