I tried to set CSS calc() using jQuery animate, for example:
$element.animate({
height: 'calc(100% - 30px)'
}, 500);
and I noticed that calc() is not working with jQuery animate...
I hope that there is a way to do it, I don't want a similar way to do it, an alternative or a workaround, I want to set calc()
Is this impossible? In any way?
If it is possible, please can you show how?
$(document).width()is same as100%did you try that ?calcisn't supported byjQuery animate. From the manual:All animated properties should be animated to a single numeric value,resizeevent:$(window).on("resize",function(){and set the css height accordingly.