PageSourceSearch

https://www.smithbergerrealty.com/Scripts/Views/SearchBar.js

js smithbergerrealty.com collected 2026-10-09 00:37:16 UTC 2,711 bytes, 84 lines download raw bytes

1var selectedfromTypeAhead = false;
2
3$(document).ready(function () {
4    $('.slick-banner').slick({
5        slidesToScroll: 1,
6        autoplay: true,
7        autoplaySpeed: 5000,
8        arrows: false,
9        adaptiveHeight: true,
10        fade: true,
11        cssEase: 'linear',
12        mobileFirst: true,
13    });
14
15    Typeahead();
16
17    $('#propertyTypes').on('change', function (e) {
18        $("#paramSEO2").val($(this).val().replace(/[^\w\s!?]/g, '-').split(' ').join('-'));
19
20    });
21});
22
23function Typeahead() {
24
25    $.widget("custom.catcomplete", $.ui.autocomplete, {
26
27
28        _renderMenu: function (ul, items) {
29
30            
31            var that = this,
32                currentCategory = "";
33            $.each(items, function (index, item) {
34
35                if (item.categoryId !== currentCategory) {
36                    if (item.categoryId === 1) {
37                        ul.append("<li class='ui-autocomplete-category'><i class=\"fa fa-map-marker\" aria-hidden=\"true\"></i>  Cities </li>");
38                    }
39                    else if (item.categoryId === 4) {
40                        ul.append("<li class='ui-autocomplete-category'><i class=\"fa fa-home\" aria-hidden=\"true\"></i> Properties </li>");
41                    }
42
43                    else if (item.categoryId === 2) {
44                        ul.append(
45                            "<li class='ui-autocomplete-category'><i class=\"fa fa-map-marker\" aria-hidden=\"true\"></i>  Counties </li>");
46                    }
47                    else if (item.categoryId === 3) {
48                        ul.append(
49                            "<li class='ui-autocomplete-category'><i class=\"fa fa-map-marker\" aria-hidden=\"true\"></i>  States </li>");
50                    }
51                    currentCategory = item.categoryId;
52                }
53                that._renderItemData(ul, item).addClass(item.categoryId);
54            });
55        },
56        _renderItem: function (ul, item) {
57           
58            return $("<li ></li>")
59                .data("item.autocomplete", item)
60                .append("<span>" + item.label + " <span> <small> " + item.afterlabel +"</small>")
61                .appendTo(ul);
62        }
63
64    });
65    $('#searchlocation').catcomplete({
66        delay: 0,
67        source: listOptions,
68        position: { my: "left bottom", at: "left top", collision: "flip" },
69        select: function (event, ui) {
70
71            selectedfromTypeAhead = true;
72            $("#SearchId").val(ui.item.id);
73            $("#SearchBy").val(ui.item.categoryId);
74            $("#paramSEO1").val(ui.item.seoUrl);
75
76
77
78        },
79    });
80
81
82
83
84}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.