yando18
asked on
Need to resize a div by subtracting the height of another div using jquery.
Need to resize a div by subtracting the height of another div using jquery.
.main-wrapper is the body content
.slide is a column
.customize-opt is a div within the main-wrapper class
<div class="main-wrapper">
<div class="customize-opt">
<p>content</p>
</div>
<div class="slider">
<p>content</p>
</div>
</div>
resizeCol: function(){
var $this = $(this),
$slide = $('.slider'),
$mainWrapper = $('.main-wrapper'),
$customizeOpt = $('.customize-opt');
$slide.css({'height': ($mainWrapper.height - $customizeOpt.height) + 'px'});
},
.main-wrapper is the body content
.slide is a column
.customize-opt is a div within the main-wrapper class
<div class="main-wrapper">
<div class="customize-opt">
<p>content</p>
</div>
<div class="slider">
<p>content</p>
</div>
</div>
resizeCol: function(){
var $this = $(this),
$slide = $('.slider'),
$mainWrapper = $('.main-wrapper'),
$customizeOpt = $('.customize-opt');
$slide.css({'height': ($mainWrapper.height - $customizeOpt.height) + 'px'});
},
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.