jquery get div height dynamically

Solutions on MaxInterview for jquery get div height dynamically by the best coders in the world

showing results for - "jquery get div height dynamically"
Francisco
23 Aug 2016
1// Calculate height according to the div width
2$(function() {
3  var myDivWidth = $(".main-div").css("width") + "px";
4  // the variable will now have our div width
5  $(".main-div").css("height", myDivWidth)
6  // Another Way
7  $(".main-div").css({
8    "height": myDivWidth
9  })
10})
Santino
18 Nov 2019
1$(document).ready(function() {
2    var divHeight = $('.col-1').height(); 
3    $('.col-2').css('min-height', divHeight+'px');
4});  
5
Lia
25 Feb 2020
1$('elem').height();
2