$(document).ready(function () { $("#myDiv").click(function () { $(this).css({ 'background-color': 'red', 'margin-left': '400px' }); }); });
<html> <head> <title>CSS Multiple</title> </head> <body> <div id="myDiv"> Click ME </div><br /> <input type="button" id="reset" value="Reset" onclick="location.reload()" /> </body> </html>
#myDiv { background-color:Green; width:200px; height:200px; color:White; }