Useful for all you evil people looking to make their users scroll to the bottom of a panel to verify that the user has read a legal agreement (think Apple or Microsoft). Very simple jQuery solution to this..


<h2>Please read this boring legal mambo jambo</h2>
<div class="scrollable-window">
   <p>Some really long boring legal text</p>
<div class="success hidden">
  You read all of that boring text! Wow!


body {
  font-family: Arial, sans-serif;

.success {
  color: green;

.hidden {
  display: none;

div.scrollable-window {
  max-height: 200px;
  padding: 5px;
  background: white;
  overflow-y: scroll;

JavaScript / jQuery:

$(function() {
  var divHeight = $('.scrollable-window').outerHeight();
  var scrollHeight = $('.scrollable-window')[0].scrollHeight;
  var successMessage = $('.success');
     var offset = $(this)[0].scrollTop;
     if (offset + divHeight >= scrollHeight) {

Bish bash bosh, you're done.

JS Fiddle here: