I have a set of buttons that reveal content using a jquery accordion (for a mobile site). I am wondering what the best way would be so that when a user selects the other button, it scrolls to the top of that button that was selected.
Here's what I currently have for my accordion script:
$( "#accordion" ).accordion({
collapsible: true,
active: false,
autoHeight: false,
clearStyle: true
});
});
I also made this fiddle, but it doesn't really function like it does when viewing it on a mobile device (unless you resize the window/viewport area. Then it functions like it would on a mobile device.)