Created
December 28, 2012 04:18
-
-
Save colewinans/4394433 to your computer and use it in GitHub Desktop.
Synchronized scrolling between two divs
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
$(document).ready(function(){ | |
var topdivPos = $(".table-top").position(); | |
$(".table-bottom").css("position","absolute").css("top",topdivPos.top).css("left",topdivPos.left).show(); | |
$(".table-top").scroll(function(){ | |
$(".table-bottom").scrollTop($(".table-top").scrollTop()); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment