untested but something like this should work using closure: $('#' + self.options.auto_complete_id + ' li').each(function (i) { $(this).bind('mouseover', function() { if (i == 3) { //code } }); });
David
untested but something like this should work using closure: $('#' + self.options.auto_complete_id + ' li').each(function (i) { $(this).bind('mouseover', function() { if (i == 3) { //code } }); });
David