jquery/jquery-mobile — pull request #5396 by pillex (2012-12-21 10:21:09+00:00)
Title: auto repositioning of opened collapsibles

toddparker asked me to do a pull request.

https://github.com/jquery/jquery-mobile/issues/5394

it's a first. no idea what i'm doing. so bear with me if it 's looking stupid (eg. don't know where to put the scroll function). tested this locally, seems to work as intended.

after opening a collapsible it's often badly positioned and you start scrolling immediately.

feature request:
when you open a collapsible it should automatically scroll into the best possible position

if it's fully visible: do nothing
if it's partly visible: scroll as little as to make it fully visible
if larger than viewport: scroll to top of screen
could at least be done as an option if is problematic as default.

demo:
http://jsbin.com/amozef/30