i have built accordion inside tinyscroll bar div. problem tiny scrollbar not extending (height) when accordion menu opens.
here code
$('#test').click(function(){ $('#dialog').show(); $('#scrollbar1').tinyscrollbar(); $('#overlay').show(); }); //accordion $('#accordion-3').dcaccordion({ eventtype: 'click', autoclose: true, savestate: false, disablelink: false, showcount: false, speed: 'slow' });
you need call $('#scrollbar1').tinyscrollbar_update(); once accordion has finished animation, so:
$('#test').click(function(){ $('#dialog').show(); $('#scrollbar1').tinyscrollbar(); $('#overlay').show(); }); //accordion $('#accordion-3').dcaccordion({ eventtype: 'click', autoclose: true, savestate: false, disablelink: false, showcount: false, speed: '400' }); $("#accordion-3").on("click", function() { window.settimeout( function() { $('#scrollbar1').tinyscrollbar_update(); } , 400 ); }); i don't think dcaccordion has sort of callback feature, you're stuck settimeout
Comments
Post a Comment