jQuery innerWidth()
jQuery innerWidth() method returns the inner width of the selected element. Padding is included in this method but not the border and margin. Syntax: $(selector).innerWidth() Example1: <!DOCTYPE html> <html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js”></script> <script> $(document).ready(function(){ $(“button”).click(function(){ alert(“Inner width of the div is: ” + $(“div”).innerWidth()); }); }); </script> </head> <body> <div style=”height:100px;width:500px;padding:5px;margin:3px;border:1px solid blue;background-color:lightpink;”></div><br> <button>Width</button> </body> … Read more