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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -