My question tells everything. I have already tried the following :-
$(window).scroll(function() {
var height=$(window).scrollTop();
$(div).html(height);
});
You can see it live at http://jsfiddle.net/JdXQA/ . But it is not working. Any help will be appreciated. Thanks in advace.