title: binding settimeout on mouseleave with jquery
body: <p>I was building a slide-menu with javascript using classes and objects and a little bit of jquery as part of my efforts to learn javascript more deeply.
  Everything went right until I wanted to bind a mouseleave to the initiator of my menu.
  So here's my code block</p>
  
  <pre><code> var el;
   function generate(obj){
    return function(){obj.slidein();}
    } 
   function slider(arg1,arg2){
   ...//Some junk
   el=this;
   for(i=0;i&lt;this.nsubs;i++){ ...
   $("#"+this.id+i).bind('mouseleave',function(){setTimeout("generate(el)",500)});
    }
   ...
   }
  </code></pre>
  
  <p>Well, I get no error on firefox error console but somehow the slidein() function which I want to be attached to the mouseleave is not being called when mouse leaves the element in question. </p>
  
  <p>Can Someone explain what I am doing wrong here?</p>