jquery set stule code example
Example 1: how to css in jquery
$(init);
function init() {
$("h1").css("backgroundColor", "yellow");
$("#myParagraph").css({ "backgroundColor": "black", "color": "white" });
$(".bordered").css("border", "1px solid black");
}
Example 2: styling element using jquery
Syntax:
$(selector).css(property-name:property-value);
Example:
$('.bodytext').css('color':'red');