over 9 years ago
Hello all,
To set the css of any html element such as Div from jQuery, we can use various ways. Some of them are listed below :
We can use .css() methods which sets the CSS property for the html elements
Ex.
$('#myDiv').css("display", "block");
We can also use the .attr() methods which sets the attributes of the html elements
$('#myDiv').attr('style', 'border: 1px solid rgb(195, 195, 195); width: auto; color: rgb(195, 195, 195) !important');
In JavaScript we can simply set the style of that particular element by following way
document.getElementById("p2").style.color = "blue";
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)