Ziegler Bolt & Nut House
Menu
Search <![CDATA[ $(document).ready(function() { var autocomplete = $("#small-searchterms").kendoAutoComplete( { highlightFirst: "True" == "True", minLength: 3, dataTextField: "ProductName", filter: "contains", template: '' + '' + '' + '‘ + ‘]]>’ + ” + ” +
‘
${ data.Name }
‘ +
” + ‘
SKU – # var sku = “”; if (data.SKU) { price = data.SKU } # #= SKU #
‘ + ‘
# var price = “”; if (data.ProductPrice.Price) { price = data.ProductPrice.Price } # #= price #
‘ + ‘ ‘+ //”+ //” + ” + ”,
dataSource: new kendo.data.DataSource({
serverFiltering: true,
requestStart: function(e) {
$(“#small-searchterms”).addClass(“instant-search-busy”);
},
change: function(e) {
$(“#small-searchterms”).removeClass(“instant-search-busy”);
},
transport: {
read: “https://www.zieglerbolt.com/InstantSearch/InstantSearchFor”,
parameterMap: function(data) {
return { q: $(“#small-searchterms”).val(), categoryId: $(“#instant-search-categories”).val() };
}
}
}
),
change: function(e) {
var selected = $(“.k-list”).find(“.k-state-selected”);
var url = selected.find(‘.instant-search-item’).attr(‘data-url’);
if (typeof url === “undefined”) {
// do nothing as the value has probably been changed from the onblur event handler rather than from dropdown selection
} else {
// navigate to the searched product
setLocation(url);
}
},
dataBound: function() {
$(“.k-animation-container”).addClass(“instantSearch”);
}
});
if (“True” == “False”) {
$(“.search-box form”).on(“keydown”, function(e) {
if (e.keyCode === 13) {
$(this).submit();
}
});
}
$(“.search-box form”).submit(function(e) {
var selectedCategory = $(“#instant-search-categories”).val() || 0;
var searchedTerm = $(“#small-searchterms”).val();
if (searchedTerm && searchedTerm != “”) {
window.location.href = “/” + “search?as=true&cid=” + selectedCategory + “&q=” + encodeURIComponent(searchedTerm) + “&Sid=True&Isc=true”;
}
e.preventDefault();
});
});
Ziegler Bolt & Nut House
If you have any question please CONTACT Us Email us at: [email protected] Call US :(936) 588-1888
Don’t Forget to Visit our Services