PageSourceSearch

https://sharrymonfette.com/wp-content/themes/von-hacht-associates/js/custom.js

js sharrymonfette.com collected 2026-10-10 00:12:00 UTC 9,697 bytes, 266 lines download raw bytes

1;
2(function ($) {
3  var scrollOut;
4
5  $(document).on('ready', function () {
6    $('.more').readmore({
7      speed: 400,
8      collapsedHeight: 372,
9      moreLink: '<a href="#" class="reade-more">Read more</a>',
10      lessLink: '<a href="#" class="reade-more reade-more--less">Read less</a>',
11      heightMargin: 16
12    });
13
14    if ($(window).width() > 350) {
15      $('.more-2').readmore({
16        speed: 400,
17        collapsedHeight: 360,
18        moreLink: '<a href="#" class="reade-more">Read more</a>',
19        lessLink: '<a href="#" class="reade-more reade-more--less">Read less</a>',
20        heightMargin: 16
21      });
22    } else {
23      $('.more-2').readmore({
24        speed: 400,
25        collapsedHeight: 347,
26        moreLink: '<a href="#" class="reade-more">Read more</a>',
27        lessLink: '<a href="#" class="reade-more reade-more--less">Read less</a>',
28        heightMargin: 16
29      });
30    }
31
32    // Category Filter
33    $('#cat').change(function () {
34
35          var dropdown = document.getElementById("cat");
36          if (dropdown.options[dropdown.selectedIndex].value) {
37            var category = dropdown.options[dropdown.selectedIndex].value;
38            filterPosts(category);
39          }
40        }
41    );
42    $('.cn-pagination .page-numbers').click(function (e) {
43      e.preventDefault();
44      filterPosts('-1', $(this).attr('href'));
45    });
46    function filterPosts(category = '', paged = 1) {
47
48      data = {
49        action: 'filter_posts',
50        category: category,
51        paged: paged,
52      };
53      $('.faqs-list-js').fadeOut();
54      $.post(gngf_vars.ajax_url, data, function (response) {
55
56        if (response) {
57          $('.faqs-list-js').html(response);
58          $('.faqs-list-js').addClass('ajax-js');
59          $('.ajax-js .cn-pagination .page-numbers').click(function (e) {
60            e.preventDefault();
61            filterPosts(category, $(this).attr('href'));
62          });
63          $('.faqs-list-js').fadeIn();
64        }
65      });
66    }
67  $('.single_tab').each(function () {
68      let height = $(this).find('.hide-in-open').height();
69      $(this).css('paddingBottom', `${height + 34}px`);
70    });
71
72    $('.single_tab__title').click(function () {
73      $(this).parent().find('.hide-in-open').slideToggle();
74      $(this).parent().find('.single_tab__content').slideToggle();
75      $(this).parents('.single_tab').toggleClass('active').toggleClass('open');
76    });
77
78    $('.genesis-sidebar-title.screen-reader-text').remove();
79
80    $('.team-tab-li').click(function () {
81      var $this = $(this);
82      if (!$this.hasClass('open')) {
83        $('.team-tab-li.open').removeClass('open');
84        $('.team-tab-content.open').removeClass('open');
85
86        $this.addClass('open');
87        var $this_data = $this.data('tab-id');
88        $('.' + $this_data).addClass('open');
89
90      }
91    });
92
93    $(document).on('click', 'a[href^="#"]', function (event) {
94      event.preventDefault();
95
96      $('html, body').animate({
97        scrollTop: $($.attr(this, 'href')).offset().top - 120
98      }, 500);
99    });
100
101    $('.responsive-menu-search-box').removeAttr('placeholder');
102
103
104    $('.parallax').jarallax({
105      speed: 0.5,
106      disableParallax: /iPad|iPhone|iPod|Android/,
107    });
108
109
110  });
111
112// Scripts which runs after all elements load
113
114  $(window).on('load', function () {
115
116
117    $('.parallax').jarallax({
118      speed: 0.5,
119      disableParallax: /iPad|iPhone|iPod|Android/,
120    });
121
122  });
123
124// Scripts which runs at window resize
125
126  $(window).on('resize', function () {
127     $('.single_tab').each(function () {
128      let height = $(this).find('.hide-in-open').height();
129      $(this).css('paddingBottom', `${height + 34}px`);
130    });
131  });
132
133// Scripts which runs on scrolling
134
135  $(window).on('scroll', function () {
136
137
138  });
139
140  /*!
141  * @preserve
142  *
143  * Readmore.js jQuery plugin
144  * Author: @jed_foster
145  */
146  !function (t) {
147    "function" == typeof define && define.amd ? define(["jquery"], t) : "object" == typeof exports ? module.exports = t(require("jquery")) : t(jQuery)
148  }(function (t) {
149    "use strict";
150
151    function e(t, e, i) {
152      var o;
153      return function () {
154        var n = this, a = arguments, s = function () {
155          o = null, i || t.apply(n, a)
156        }, r = i && !o;
157        clearTimeout(o), o = setTimeout(s, e), r && t.apply(n, a)
158      }
159    }
160
161    function i(t) {
162      var e = ++h;
163      return String(null == t ? "rmjs-" : t) + e
164    }
165
166    function o(t) {
167      var e = t.clone().css({height: "auto", width: t.width(), maxHeight: "none", overflow: "hidden"}).insertAfter(t),
168        i = e.outerHeight(), o = parseInt(e.css({maxHeight: ""}).css("max-height").replace(/[^-\d\.]/g, ""), 10),
169        n = t.data("defaultHeight");
170      e.remove();
171      var a = o || t.data("collapsedHeight") || n;
172      t.data({expandedHeight: i, maxHeight: o, collapsedHeight: a}).css({maxHeight: "none"})
173    }
174
175    function n(t) {
176      if (!d[t.selector]) {
177        var e = " ";
178        t.embedCSS && "" !== t.blockCSS && (e += t.selector + " + [data-readmore-toggle], " + t.selector + "[data-readmore]{" + t.blockCSS + "}"), e += t.selector + "[data-readmore]{transition: height " + t.speed + "ms;overflow: hidden;}", function (t, e) {
179          var i = t.createElement("style");
180          i.type = "text/css", i.styleSheet ? i.styleSheet.cssText = e : i.appendChild(t.createTextNode(e)), t.getElementsByTagName("head")[0].appendChild(i)
181        }(document, e), d[t.selector] = !0
182      }
183    }
184
185    function a(e, i) {
186      this.element = e, this.options = t.extend({}, r, i), n(this.options), this._defaults = r, this._name = s, this.init(), window.addEventListener ? (window.addEventListener("load", c), window.addEventListener("resize", c)) : (window.attachEvent("load", c), window.attachEvent("resize", c))
187    }
188
189    var s = "readmore", r = {
190      speed: 100,
191      collapsedHeight: 200,
192      heightMargin: 16,
193      moreLink: '<a href="#">Read More</a>',
194      lessLink: '<a href="#">Close</a>',
195      embedCSS: !0,
196      blockCSS: "display: block; width: 100%;",
197      startOpen: !1,
198      blockProcessed: function () {
199      },
200      beforeToggle: function () {
201      },
202      afterToggle: function () {
203      }
204    }, d = {}, h = 0, c = e(function () {
205      t("[data-readmore]").each(function () {
206        var e = t(this), i = "true" === e.attr("aria-expanded");
207        o(e), e.css({height: e.data(i ? "expandedHeight" : "collapsedHeight")})
208      })
209    }, 100);
210    a.prototype = {
211      init: function () {
212        var e = t(this.element);
213        e.data({defaultHeight: this.options.collapsedHeight, heightMargin: this.options.heightMargin}), o(e);
214        var n = e.data("collapsedHeight"), a = e.data("heightMargin");
215        if (e.outerHeight(!0) <= n + a) return this.options.blockProcessed && "function" == typeof this.options.blockProcessed && this.options.blockProcessed(e, !1), !0;
216        var s = e.attr("id") || i(), r = this.options.startOpen ? this.options.lessLink : this.options.moreLink;
217        e.attr({
218          "data-readmore": "",
219          "aria-expanded": this.options.startOpen,
220          id: s
221        }), e.after(t(r).on("click", function (t) {
222          return function (i) {
223            t.toggle(this, e[0], i)
224          }
225        }(this)).attr({
226          "data-readmore-toggle": s,
227          "aria-controls": s
228        })), this.options.startOpen || e.css({height: n}), this.options.blockProcessed && "function" == typeof this.options.blockProcessed && this.options.blockProcessed(e, !0)
229      }, toggle: function (e, i, o) {
230        o && o.preventDefault(), e || (e = t('[aria-controls="' + this.element.i
vendor: 1,853 bytes, lines 230-266
230d + '"]')[0]), i || (i = this.element);
231        var n = t(i), a = "", s = "", r = !1, d = n.data("collapsedHeight");
232        n.height() <= d ? (a = n.data("expandedHeight") + "px", s = "lessLink", r = !0) : (a = d, s = "moreLink"), this.options.beforeToggle && "function" == typeof this.options.beforeToggle && this.options.beforeToggle(e, n, !r), n.css({height: a}), n.on("transitionend", function (i) {
233          return function () {
234            i.options.afterToggle && "function" == typeof i.options.afterToggle && i.options.afterToggle(e, n, r), t(this).attr({"aria-expanded": r}).off("transitionend")
235          }
236        }(this)), t(e).replaceWith(t(this.options[s]).on("click", function (t) {
237          return function (e) {
238            t.toggle(this, i, e)
239          }
240        }(this)).attr({"data-readmore-toggle": n.attr("id"), "aria-controls": n.attr("id")}))
241      }, destroy: function () {
242        t(this.element).each(function () {
243          var e = t(this);
244          e.attr({"data-readmore": null, "aria-expanded": null}).css({
245            maxHeight: "",
246            height: ""
247          }).next("[data-readmore-toggle]").remove(), e.removeData()
248        })
249      }
250    }, t.fn.readmore = function (e) {
251      var i = arguments, o = this.selector;
252      return e = e || {}, "object" == typeof e ? this.each(function () {
253        if (t.data(this, "plugin_" + s)) {
254          var i = t.data(this, "plugin_" + s);
255          i.destroy.apply(i)
256        }
257        e.selector = o, t.data(this, "plugin_" + s, new a(this, e))
258      }) : "string" == typeof e && "_" !== e[0] && "init" !== e ? this.each(function () {
259        var o = t.data(this, "plugin_" + s);
260        o instanceof a && "function" == typeof o[e] && o[e].apply(o, Array.prototype.slice.call(i, 1))
261      }) : void 0
262    }
263  });
264
265}(jQuery));
266

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.