I'm using this plugin to animate some background images: http://plugins.jquery.com/project/backgroundPosition-Effect
Now it works fine until I wrap the animate function in a timer. Then it gives me errors. I'm changing the image on hover. Here's my code: var hideDelay = 2000; var hideDelayTimer = null; $(".tab_item").mouseover(function() { if (hideDelayTimer) clearTimeout(hideDelayTimer); $(this).animate({ backgroundPosition: '(0 100px)' }); }).mouseout(function(){ if (hideDelayTimer) clearTimeout(hideDelayTimer); hideDelayTimer = setTimeout(function () { $(this).animate({backgroundPosition: '(0 0)'}); hideDelayTimer = null; }, hideDelay); }); Any ideas why it wouldn't fire like this? Here's the error message: uncaught exception: [Exception... "Could not convert JavaScript argument arg 0" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js :: anonymous :: line 12" data: no]