JAVASCRIPT   75

search-autocomplete.js

Guest on 12th September 2021 10:25:12 AM

  1. var keyupTimeoutObj;function lookup_searchResult(e){void 0!==keyupTimeoutObj&&clearTimeout(keyupTimeoutObj),keyupTimeoutObj=setTimeout(function(){var s=$("#sitebase_url").text();$("#search_text").removeClass("red_border_class"),0==e.length?$("#suggestions_searchResult").hide():$.ajax({url:s+"search/autosearch",cache:!1,type:"post",data:{queryString:""+e},success:function(e){e.length>0&&($("#suggestions_searchResult").show(),$("#autoSuggestionsList_searchResult").html(e))}})},500)}function fill_searchResult(e){$("#search_text").val(e),setTimeout("$('#suggestions_searchResult').hide();",200)}function search_validate(){var e=$("#search_text").val();if(""==e||"Enter keyword or item name#"==e)return $(".header-serch").addClass("header-serch-error"),$("#submit_search").addClass("header-go-error"),!1}function search_error_remove(){$(".header-serch").removeClass("header-serch-error"),$("#submit_search").removeClass("header-go-error")}$(document).ready(function(){$("#sort_type").hover(function(){$("#sort_type_list").is(":hidden")?$("#sort_type_list").slideDown("slow"):$("#sort_type_list").hide()})});

Raw Paste


Login or Register to edit or fork this paste. It's free.