Profile

Profile

  • RSS
Member Since
September 24, 2014

Search Members

  

petermanoukian

1

Posts

Viewing 1 to 1 (1 Total)

Autosuggest jquery ajax fades out prematurely

Hello I have a jquery autosuggest that is fading out too soon:

http://www.mirochgroup.com/MirocheGroup/...

I have instructed it to start searching after the user types minimim 3 words,

so many times the results displayed fadeout as I try to pass the mouse from the input text to the results,

they fade out prematurely


$(function(){
$(".search").keyup(function()
{
var searchid = $(this).val();
var dataString = 'search='+ searchid;
if(searchid!='')
{
$.ajax({
type: "POST",
url: "searchx",
data: dataString,
cache: false,
success: function(html)
{
$("?#?result?").html(html).show();
}
});
}return false;
});
jQuery("#result").live("click",function(e){
var $clicked = $(e.target);
var $name = $clicked.find('.name').html();
var decoded = $("").html($name).text();
$('?#?searchid?').val(decoded);
});
jQuery(document).live("click", function(e) {
var $clicked = $(e.target);
if (! $clicked.hasClass("search")){
jQuery("#result").delay(4700).fadeOut('1700');
}
});
$('#searchid').click(function(){
//jQuery("#result").fadeIn("1000");
jQuery("#result").delay(4700).fadeIn('1700');
});
});


What am I doing wrong,

Many Thanks

Posted on September 24, 2014 at 7:57 AM

Badges

Code Compendium Community Member Community Member Code Compendium Community Member