Chaining the .off()
method as you've done will result in it firing immediately.
You'll want to call it in the complete
callback of the .animate()
method (i.e. wait until the animate is complete):
$('#container').on('mouseover.grow', function(){
var $this = $(this);
$this.parents('.secondary').animate({height:'360'},1000, function() {
$this.off('mouseover.grow');
});
});
Also note that we assign var $this = $(this);
since the scope of this
will be different in the callback function.