";
if ($(wrapperDiv).find('span:first') !== undefined && $(wrapperDiv).find('span:first').data("value") !== undefined) {
value = $(wrapperDiv).find('span:first').data("value");
//console.log('value: ' + value);
text = '';
}
}
}
if (value !== null && value !== undefined && value.length > 0) {
//console.log('value 1: ' + value);
var oldSelected = selectedFilter;
var finalStr = searcher.filteString();
searcher.showcount(finalStr);
if ($selectedItem !== null && $selectedItem !== undefined) {
selectedFilter = finalStr;
var elementtoRemove = $($selectedItem).attr("data-idvalue").replace('^', '=');
if (oldSelected.indexOf(elementtoRemove) >= 0) {
//Make sure we load produtcs back when option been removed from dropdown
searcher.showProducts();
}
}
}
//if ($('.tf-lozenge-row').find("span[data-value='" + newlabelId + "']").length) {
// console.log('inner loop newlabelId:' + newlabelId);
// $('.tf-lozenge-row').find("span[data-value='" + newlabelId + "']").html($('.tf-lozenge-row').find("span[data-value='" + newlabelId + "']").data("valstr"));
//}
}
},
onAdd: function (text, value, $addedChoice) {
$('.tf-lozenge-row').find('.optionItem').each(function () {
//console.log('$(this).data("valstr") 1: ' + $(this).data("valstr"));
$(this).html($(this).data("valstr"));
});
},
onRemove: function (removedValue, removedText, $removedChoice) {
}
});
$("#btnfindtiles").click(function () {
$(".category-jl-banner").hide();
searcher.clearShowAll(false);
showRelative();
// searcher.showProducts(null, $(".sortddlclass").val(), null);
if (!Foundation.MediaQuery.atLeast('large')) {
$('.tf-lozenge-row').hide();
}
$(".fade-out-search.grid").fadeOut("fast").css({ display: "block" });
$("#showProgress").show();
$("#showProgress1").show();
$('.off-canvas').foundation('close');
$('.dropdown.highlighted').each(function (index, value) {
var catName = $(this).parent().attr('data-attrname');
ga('send', 'event', 'Tile Finder', 'Filter Results Updated', catName + ' Filter Selected');
});
ga('send', 'event', 'Tile Finder', 'Update Button Clicked');
});
$("#hypClearAllTop").click(function () {
searcher.clearAllFilters(false);
showRelative();
});
$(".clearLink").click(function () {
var finalStr = '';
console.log('removeVal: ' + removeVal);
searcher.showcount(null);
});
});
$(document).ready(function () {
var base_page = "cat";
var catid = 3066;
searcher.init(base_page, catid, "divShowSearchResult", itemPerPage);
$('.categoryintrotop').appendTo('.categoryintrotop-move');
$('.categoryintrotop-move').show();
$('.categoryintrotop').show();
});
/*]]>*/