1

As browsers like ie doesn't support css calc function. so is there any way to get this working in jquery.

this is how it is done in css

.sidebar-one {
height: calc(100% - 135px);

The above code decreases 135px from its 100% height. Now how can it be in jquery

tbodt
  • 16,609
  • 6
  • 58
  • 83
user57867
  • 15
  • 5
  • This should help: [css width: calc(100% -100px); alternative using jquery](http://stackoverflow.com/questions/11117216/css-width-calc100-100px-alternative-using-jquery) – Joe Apr 11 '14 at 18:37
  • Note: http://caniuse.com/#feat=calc. IE does support `calc()`, just maybe not in the version(s) you need to support. – Jonathan Lonowski Apr 11 '14 at 18:49

1 Answers1

1
$(function() {
  var sidebar = $('.sidebar-one');
  sidebar.height(sidebar.height() - 135);
});

http://jsfiddle.net/L5z7a/

hyperdrive
  • 1,786
  • 5
  • 19
  • 33