How to use JQuary CSS Multiple Property Method
This article describe about jQuary CSS Multiple Property Method.
Set Multiple CSS Property/Value
css(properties): This method set multiple CSS properties and values in this program.
Syntax
$("selector").css("background-color","red"); |
Example
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("button").click(function () {
$("p").css({ "background-color": "red", "font-size": "150%" });
});
});
</script>
</head>
<body>
<h2>This is a jQuery</h2>
<p>This is a css.</p>
<p>This is multiple properties.</p>
<button>Click here</button>
</body>
</html>
|
Output
After click this button
You may also want to read these related articles here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here