Start a function after a user hasn't scrolled for 3 seconds.

Start a function after a user hasn't scrolled for 3 seconds.

I currently have a bid of code:

(simplified)
  1. $(function() {
  2.       $(window).bind('scroll',function(event) {
  3.             var scrollTop = $(window.scrollTop();
  4.             if (scrollTop < 100) {
  5.                   $('#wrapper').removeClass.addClass("one");
  6.             } else if (scrollTop >= 100 && scrollTop < 200) {
  7.                   $('#wrapper').removeClass.addClass("two");
  8.             } // a few more else if but you get the general idea
  9.       });
  10. });
Now I would like to perform
  1. function() {
  2.       $('#header').append("<p>"+sometextvariable+"</p>");
  3. }
But I only need it to execute if the user hasn't scrolled for three seconds. I don't really have a clue how to go about this.

with kind regards,

      Jeroen