jQuery innerHeight 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(){ $( "#heightExample" ).on( "click", function(event) { var x = $("#myDiv").innerHeight(); $("#myDiv > p").html("Inner Height = "+x+"px"); }); }); </script> <style> .myClass{ border:1px solid red; background:green; width:200px; height:100px; padding:10px; } </style> </head> <body> <h4 ><a href="javascript:void(0);" id="heightExample">Click to run .innerHeight() Example </a></h4> <div id="myDiv" class="myClass"> <------Height = 100px-----> <p> Demo Div.. </p> </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(){ $( "#heightExample" ).on( "click", function(event) { var x = $("#myDiv").innerHeight(); $("#myDiv > p").html("Inner Height = "+x+"px"); }); }); </script> <style> .myClass{ border:1px solid red; background:green; width:200px; height:100px; padding:10px; } </style> </head> <body> <h4 ><a href="javascript:void(0);" id="heightExample">Click to run .innerHeight() Example </a></h4> <div id="myDiv" class="myClass"> <------Height = 100px-----> <p> Demo Div.. </p> </div> </body> </html>
Copyrights@tutorialsplane.com