Link to home
Start Free TrialLog in
Avatar of yando18
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'});
},
ASKER CERTIFIED SOLUTION
Avatar of JPJ78
JPJ78
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial