Answers for "how you can apply a style on an element using jquery?"

CSS
54

how to set css style using jquery

$('#element').css('display', 'block'); /* Single style */
$('#element').css({'display': 'block', 'background-color' : '#2ECC40'}); /* Multiple style */
Posted by: Guest on March-04-2020
0

how to see the css style of an element in jquery

//Checking the CSS properties of an element in jQuery
$(.myElement).css('property-name')
Posted by: Guest on March-11-2022

Code answers related to "how you can apply a style on an element using jquery?"

Browse Popular Code Answers by Language