I have this function:
function block_scroll(key){
if (key) {
$(window).bind(\"scroll\", function(){
$(\'html, body\').animate({scrol
$(window).unbind('scroll');
Even though the documentation says it will remove all event handlers if called with no arguments, it is worth giving a try explicitly unbinding it.
It worked if you used single quotes? That doesn't sound right - as far as I know, JavaScript treats single and double quotes the same (unlike some other languages like PHP and C).