Adding heights of two elements jQuery -
ok, im trying achieve accordion type sidebar navigation not slide, panels open if on respective page.
my problem: in jquery, give container height of container plus height of div below each respective "active" accordion item positioned absolute. (.accordion-inner).
please have @ syntax , if writing correct jquery achieve this.
my jquery:
var container= $('.sopsnav'); var inneraccordionheight = $('.accordion-inner')' $(document).ready(function () { $('#sidebar').css({ height: sidebarheight.height() + inneraccordionheight.height() }); });
the problem find in code quote in 2nd line
var container= $('.sopsnav'); var inneraccordionheight = $('.accordion-inner')' //<--remove quote here $(document).ready(function () { $('#sidebar').css({ height: sidebarheight.height() + inneraccordionheight.height() }); });
change var inneraccordionheight = $('.accordion-inner')
Comments
Post a Comment