<input type="text" id="sShState" />
$('#sShState').liveSearch(); // A plug-in
// inside plug-in:
$this = $(this);
// On focus I add a dropdown box and add li's;
var obj = '<ul id="ddList"></ul>';
$this.after(obj);
$this.next('ul').html(li's);
$('#ddList').live('mouseenter', function(){
var $li = $this.next('ul').children('li');
$li.removeClass('hoverLi');
$li.hover(function(e){
$li.filter('[last]').removeAttr('last');
$(this).addClass('hoverLi');
},function() {
$li.filter('.hoverLi').attr('last', true);
$li.filter('.hoverLi').removeClass('hoverLi');
});
$li.click(function(){
selectLi($(this));
removeList ();
});
});
In Chrome it is very very fast!!
But in Firefox when the mouse enters for the first time over the ulbox it takes between 1-2 sec until it starts to execute the code.
Even in Internet Explorer 7 it works fine. The hovered li remains a little behind, but it starts executing immediately when the mouse enter the ul box.