Created
November 12, 2012 14:58
-
-
Save thedaviddias/4059838 to your computer and use it in GitHub Desktop.
jQuery Mobile: Expanding a collapsible + scroll top
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("div.ui-collapsible-set").live("expand", function(e) { | |
var top = $(e.target).offset().top; | |
if ($(window).scrollTop() > top) | |
$(window).scrollTop(top); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment