To initialize a value to the properties of CSS you may make use of the $(selector).css({properties}) function of Jquery CSS manipulation. This is done for all the matching elements. Here is an example to demonstrate the $(selector).css({properties}) function of Jquery CSS manipulation:
Code:
<html>
<head>
<script type="text/javascript" src="Jqry.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("p").css({"background-color":"White","font-size":"100%"})
})
})
</script>
</head>
<body bgcolor= "Red">
<p>Paragraph Line</p>
<h1>Heading</h1>
<p>Second Para.</p>
<button type="button">Change</button>
</body>
</html>
Bookmarks