jquery add style
//revising Ankur's answer
//Syntax:
$(selector).css({property-name:property-value});
//Example:
$('.bodytext').css({'color':'red'});
jquery add style
//revising Ankur's answer
//Syntax:
$(selector).css({property-name:property-value});
//Example:
$('.bodytext').css({'color':'red'});
jquery css
$('#element').css('display', 'block'); /* Single style */
$('#element').css({'display': 'block', 'background-color' : '#2ECC40'}); /* Multiple style */
styling element using jquery
Syntax:
$(selector).css(property-name:property-value);
Example:
$('.bodytext').css('color':'red');
how to css in jquery
$(init);
function init() {
$("h1").css("backgroundColor", "yellow");
$("#myParagraph").css({ "backgroundColor": "black", "color": "white" });
$(".bordered").css("border", "1px solid black");
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us