Reputation: 26979
I have built accordion inside tinyscroll bar div. But the problem is tiny scrollbar is not extending (height) when the accordion menu opens.
Here is my 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'
});
Upvotes: 0
Views: 322
Reputation: 2562
you need to call $('#scrollbar1').tinyscrollbar_update();
once the accordion has finished its animation, like 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 any sort of callback feature, so you're stuck with setTimeout
Upvotes: 1