how I can use more than one property in css method in jquery?
$(document).ready(function(e){
$("#dv1").click(function(){
$(this).css("height","200px")
$(this).css("backgroundColor","red")
})
})
how I can use more than one property in css method in jquery?
$(document).ready(function(e){
$("#dv1").click(function(){
$(this).css("height","200px")
$(this).css("backgroundColor","red")
})
})
You can specify all the CSS properties in object form:
$(document).ready(function(e){
$("#dv1").click(function(){
$(this).css({
height: "200px",
backgroundColor: "red"
});
});
});