I have hero-slider which open on button click and i also assign affix to one div which is fixed now i want to add height of hero-slider to affix like if hero-slider is display none then affix should add height as 0 else height as whatever height of hero-slider.
$('#filter').affix({
offset: {
top: 0, //here i want dynamic height of hero-slider
bottom: 370
}
});