I am trying to implement a fallback for the use of calc()
in my CSS using jQuery
CSS:
width: calc(100% - 90px);
However, when I tried running the code below, it seems like the second css()
function is not executing. I suspect that there might be an issue but I am unable to figure it out.
jQuery:
var paxWidth = '-' + ($('.pax').width() + 10) + 'px';
console.log(paxWidth); // this returns -90px
$('.datetime,.placeholder').css('width','100%').css('width', paxWidth);