dynatree - How to scroll to active node?
-
31-10-2019 - |
Frage
I have dynatree with fixed height and vertical scrollbar.
node.activate(); selects the node i'm searching for, but doesnt move the vertical scrollbar, so i have to scroll manualy to see active node.
How do i scroll it programmaticlly?
Thanks to mar10, I solved this problem:
var activeLi = node.li;
$('#tree').animate({
scrollTop: $(activeLi).offset().top - $('#tree').offset().top + $('#tree').scrollTop()
}, 'slow');
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow