rem: if (val.length >= minChars) { input.addClass("loading"); var params = {}; params[paramName] = val; $.get(url, params, function(data) { if (data) { if ($.browser.msie) { results.html(""); results .append(document.createElement("iframe")) .append($("<div>").html(data).css("z-index", "101")); } else { results.html(data); } results.fadeTo("fast", 0.95); items = $("li", results); items .hover(function() { move(items.index(this)) }, function() { $(this).removeClass("selected") }) .click(function() { select(this) }); move(0); } else { hide(); 
add: if (val.length < minChars) { hide(); return; } input.addClass("loading"); var params = {}; params[paramName] = val; $.get(url, params, function(data) { if (!data) { hide(); return; } if (!results) { var offset = getOffset(input); results = $("<div>").addClass("suggestions").css({ position: "absolute", minWidth: input.get(0).offsetWidth + "px", top:  (offset.top + input.get(0).offsetHeight) + "px", left: offset.left + "px", zIndex: 2 }).appendTo("body"); if ($.browser.msie) { var iframe = $("<iframe style='display:none;position:absolute;" + "filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);'" + " class='iefix' src='javascript:false;' frameborder='0'" + " scrolling='no'></iframe>").insertAfter(results); setTimeout(function() { var offset = getOffset(results); iframe.css({ top: offset.top + "px", right: (offset.left + results.get(0).offsetWidth) + "px", bottom: (offset.top + results.get(0).offsetHeight) + "px", left: offset.left + "px", zIndex: 1 }); iframe.show(); }, 10); 
context:   function show() {    var val = input.val();    if (val == prev) return;    prev = val;    if (val.length >= minChars) {      input.addClass("loading");      var params = {};      params[paramName] = val;      $.get(url, params, function(data) {        if (data) {          if ($.browser.msie) {            results.html("");            results              .append(document.createElement("iframe"))              .append($("<div>").html(data).css("z-index", "101"));          } else {            results.html(data);          }          results.fadeTo("fast", 0.95);          items = $("li", results);          items            .hover(function() { move(items.index(this)) },                   function() { $(this).removeClass("selected") })            .click(function() { select(this) });          move(0);        } else {          hide();        }      });    } else {      results.hide();    }  }
meta: 2557	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2557/ec175125151132e27d1156f40f74eacc8c511014/suggest.js/clean/htdocs/js/suggest.js