Answers for "how to style element in jquery"

2

jquery style

$("p").css("background-color", "yellow");
Posted by: Guest on September-16-2021
1

styling element using jquery

Syntax:
$(selector).css(property-name:property-value);

Example:
$('.bodytext').css('color':'red');
Posted by: Guest on June-01-2020
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");
}
Posted by: Guest on October-22-2020

Code answers related to "how to style element in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language