jQuery css Method
home
Run
screen_rotation
fullscreen
cloud_download
navigate_before
<!DOCTYPE html> <html> <head> <title>jQuery Demo example</title> <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $( "#cssExample" ).on( "click", function(event) { $("#css").css({'background':'yellow','font-size':'24px','border':'2px solid red'}); }); }); </script> <style> div{ margin:10px; min-height:50px; min-width:100%; border:1px solid blue; float:left; } .myClass{ border:1px solid red; background:green; } </style> </head> <body> <h4 ><a href="javascript:void(0);" id="cssExample">Click to run .css() Example </a></h4> <div id="css" class="myClass"> Add Style ... </div> </body> </html>
<!DOCTYPE html> <html> <head> <title>jQuery Demo example</title> <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $( "#cssExample" ).on( "click", function(event) { $("#css").css({'background':'yellow','font-size':'24px','border':'2px solid red'}); }); }); </script> <style> div{ margin:10px; min-height:50px; min-width:100%; border:1px solid blue; float:left; } .myClass{ border:1px solid red; background:green; } </style> </head> <body> <h4 ><a href="javascript:void(0);" id="cssExample">Click to run .css() Example </a></h4> <div id="css" class="myClass"> Add Style ... </div> </body> </html>
Copyrights@tutorialsplane.com