PageSourceSearch

https://www.mycityplumbing.com/wp-content/themes/plumberseo-bootstrap/inc/assets/js/scripts.js?ver=7.1.2

js mycityplumbing.com collected 2026-09-29 08:45:41 UTC 2,475 bytes, 81 lines download raw bytes

1
2jQuery(document).ready(function() {
3    
4  // Adds CAMP wrap to Smart forms
5 jQuery('iframe[src*="msgsndr.com/widget/form"]').wrap("<div class='camp-form'/>");
6
7
8  var $ = jQuery;
9
10$(window).scroll(function(){
11    if ($(window).scrollTop() >= 300) {
12        $('#masthead').addClass('smallbar');
13    }
14    else {
15        $('#masthead').removeClass('smallbar');
16    }
17});
18
19
20var position = $(window).scrollTop(); 
21
22console.log(position);
23
24// should start at 0
25
26$(window).scroll(function() {
27    var scroll = $(window).scrollTop();
28    if(scroll > position) {
29        $('.quick-nav').removeClass('adjust');
30    } else {
31        $('.quick-nav').addClass('adjust');
32
33    }
34    position = scroll;
35});
36
37
38$('.sched-link > a').attr("data-bs-target","#exampleModal");
39
40$('.sched-link > a').attr("data-bs-toggle","modal");
41
42
43$( ".floating-nav" ).click(function() {
44  $( this ).toggleClass('display-nav')
45});
46
47
48$('.top-services').mousemove(function(e){
49    $(".truck-image").css({left:e.pageX,  transform: "translateX(-65px)" });
50});
51
52  
53function search() {
54  // When bound with the event listener, "this" becomes the object the event listener is on.
55  input = this;
56
57  filter = input.value.toUpperCase()
58  // we want to make sure we are only getting LI elements from inside our specific list.
59  list_items = document.querySelectorAll(".faq-blogs .blog-select ");
60  // not a lone of reason to use forEach anymore, when for(let item of list_items){...} would do the same thing.
61  list_items.forEach(item => {
62    // the previous way of using the tagname etc was functionally the same to this.
63    a = item.querySelector("a");
64    txt = a.textContent || a.innerText;
65    // This has a similar feature to jQuery's class toggle.
66    // If the portion in the second argument evaluates to true, the class will be applied.
67    // Otherwise, the class is not.
68    item.classList.toggle('hidden', txt.toUpperCase().indexOf(filter) == -1);
69  });
70  // Written this way for readability
71  document.querySelector('.no-result').classList.toggle(
72    'hidden', 
73    // If every element from the array contains a hidden, the .every call wil be true.
74    // since we want to SHOW the element in that case, we use the opposite to determine if the class should be applied.
75    !Array.from(list_items).every(item => item.classList.contains('hidden'))
76  );
77}
78// the whole () => search() thing was redundant. This is just fine.
79document.querySelector("#input_search").addEventListener('input', search)    
80
81});

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.