I am currently working with Vue.js and I need to adjust the height of one div based on the height of another div using pure JavaScript. The issue I am encountering is that I am unable to set the height using plain JavaScript, however it works fine with jQuery. Can someone help me convert this jQuery code to JavaScript? Below is the code snippet I am using:
Vue.nextTick(function () {
var offsetHeight = document.getElementById('filterSection').offsetHeight;
document.querySelector(".searchResultSection").style.maxHeight = `calc(100% - ${offsetHeight}px)`;
});
I am looking to replace the jQuery part with vanilla JavaScript.