Example 1: change background colour jquery
$(document).ready(function() { $("button").mouseover(function() { var p = $("p#44.test").css("background-color", "yellow"); p.hide(1500).show(1500); p.queue(function() { p.css("background-color", "red"); }); }); });
Example 2: how to change the background color in jquery
$("#co").click(function(){ $(this).css({"backgroundColor" : "blue"}); });
Example 3: jquery css
$('#element').css('display', 'block'); /* Single style */ $('#element').css({'display': 'block', 'background-color' : '#2ECC40'}); /* Multiple style */
Example 4: edit css jquery
$('.ama').css('color','red');
Example 5: jquery fedein background color
$("div" ).hover( function() { $(this).animate({backgroundColor: "#fff"}, 'slow'); }, function() { $(this).animate({backgroundColor:"#000"},'slow'); });
Comments
Post a Comment