jQuery removeAttr Method
home
Run
screen_rotation
fullscreen
cloud_download
<!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(){ $( "#attrExample" ).on( "click", function(event) { $("div").removeAttr("style"); }); }); </script> <style> div{ margin:10px; height:300px; width:300px; border:1px solid blue; float:left; } </style> </head> <body> <h4 ><a href="javascript:void(0);" id="attrExample">Click to run .removeAttr() Example </a></h4> <div height="100px;" width="200px" style="background:red;border:1px solid green;" ></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(){ $( "#attrExample" ).on( "click", function(event) { $("div").removeAttr("style"); }); }); </script> <style> div{ margin:10px; height:300px; width:300px; border:1px solid blue; float:left; } </style> </head> <body> <h4 ><a href="javascript:void(0);" id="attrExample">Click to run .removeAttr() Example </a></h4> <div height="100px;" width="200px" style="background:red;border:1px solid green;" ></div> </body> </html>
Copyrights@tutorialsplane.com