New Landing How can we help? Themeforest Theme Support Neighborhood How to de-activate the Ajax search in the top menu?

Viewing 2 posts - 1 through 2 (of 2 total)
  • #114866
    azura_eyes
    Member
    Post count: 48

    Hi,

    I need to search products by SKU as well, so added the “search by SKU” plugin in. It works great BUT is not compatible with the Ajax function in the search field in the header menu. Since in the Ajax “drop down result list” says NO results while after pressing the Enter and getting to the search result web there are some hits.

    That makes the Ajax function incorrect, so I need to deactivate the “drop down Ajax results” and only have the search input field working as “regular” search filed.

    How can I de-activate this?
    Please, not I don’t want to remove the javascript function showing the text “search” in the input field. Hope you follow my thoughts 🙂

    Thanks!

    #115049
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    Go to functions.js file in the js folder inside the theme folder, around line #466 and #475 comment this lines

    
    jQuery('.ajax-search-form input[name=s]').on('keyup', function(e) {
    				var searchvalue = e.currentTarget.value;
    
    				clearTimeout(searchTimer);								
    	            if (lastAjaxSearchValue != jQuery.trim(searchvalue) && searchvalue.length >= 3) {
    	                searchTimer = setTimeout( function() {
    	                	SF.nav.ajaxSearch(e);
    	                }, 400);
    	            }
    			});

    It will disable the ajax search.

    Let us know,

    Thanks,
    laranz.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register