PageSourceSearch

https://www.titusregional.com/wp-content/themes/pro-child/find-a-provider/provider-script.js?ver=4.8.6

js titusregional.com collected 2026-09-26 08:59:55 UTC 4,352 bytes, 163 lines download raw bytes

1jQuery(document).ready(function(){
2  //console.log("running dude");
3  jQuery('.titusSubmit').click(function(){
4    jQuery('#provider-search-form').submit();
5  });
6
7  jQuery('#provider-search-form').submit(function(){
8    console.log("#provider-search-form");
9    var titusvalue = jQuery('.titusSearch').val();
10    var specialty = jQuery('.titusSpecialty').val();
11    document.cookie = "titus-regional-search="+titusvalue+"; Path=/; ";
12    document.cookie = "titus-regional-specialty="+specialty+"; Path=/; ";
13    document.getElementById("provider-search-form").submit();
14  });
15
16  jQuery('.specialty-trigger').click(function(){
17    var titusvalue = ""
18    var specialty = jQuery(this).attr("data-specialty");
19    delete_cookie('titus-regional-search');
20    delete_cookie('titus-regional-specialty');
21    document.cookie = "titus-regional-search="+titusvalue+"; Path=/; ";
22    document.cookie = "titus-regional-specialty="+specialty+"; Path=/; ";
23    window.location = '/our-medical-team/';
24  });
25
26  jQuery('.titusReset').click(function(){
27    console.log(".titusReset");
28    delete_cookie('titus-regional-search');
29    delete_cookie('titus-regional-specialty');
30    document.getElementById('provider-reset-form').submit();
31  });
32
33  function delete_cookie(name) {
34    console.log('Delete Cookie '+name +'=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;');
35    document.cookie = name +'=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
36  }
37
38});
39
40(function( $ ) {
41
42  /**
43   * initMap
44   *
45   * Renders a Google Map onto the selected jQuery element
46   *
47   * @date    22/10/19
48   * @since   5.8.6
49   *
50   * @param   jQuery $el The jQuery element.
51   * @return  object The map instance.
52   */
53  function initMap( $el ) {
54  
55      // Find marker elements within map.
56      var $markers = $el.find('.marker');
57  
58      // Create gerenic map.
59      var mapArgs = {
60          zoom        : $el.data('zoom') || 16,
61          mapTypeId   : google.maps.MapTypeId.ROADMAP
62      };
63      var map = new google.maps.Map( $el[0], mapArgs );
64  
65      // Add markers.
66      map.markers = [];
67      $markers.each(function(){
68          initMarker( $(this), map );
69      });
70  
71      // Center map based on markers.
72      centerMap( map );
73  
74      // Return map instance.
75      return map;
76  }
77  
78  /**
79   * initMarker
80   *
81   * Creates a marker for the given jQuery element and map.
82   *
83   * @date    22/10/19
84   * @since   5.8.6
85   *
86   * @param   jQuery $el The jQuery element.
87   * @param   object The map instance.
88   * @return  object The marker instance.
89   */
90  function initMarker( $marker, map ) {
91  
92      // Get position from marker.
93      var lat = $marker.data('lat');
94      var lng = $marker.data('lng');
95      var latLng = {
96          lat: parseFloat( lat ),
97          lng: parseFloat( lng )
98      };
99  
100      // Create marker instance.
101      var marker = new google.maps.Marker({
102          position : latLng,
103          map: map
104      });
105  
106      // Append to reference for later use.
107      map.markers.push( marker );
108  
109      // If marker contains HTML, add it to an infoWindow.
110      if( $marker.html() ){
111  
112          // Create info window.
113          var infowindow = new google.maps.InfoWindow({
114              content: $marker.html()
115          });
116  
117          // Show info window when marker is clicked.
118          google.maps.event.addListener(marker, 'click', function() {
119              infowindow.open( map, marker );
120          });
121      }
122  }
123  
124  /**
125   * centerMap
126   *
127   * Centers the map showing all markers in view.
128   *
129   * @date    22/10/19
130   * @since   5.8.6
131   *
132   * @param   object The map instance.
133   * @return  void
134   */
135  function centerMap( map ) {
136  
137      // Create map boundaries from all map markers.
138      var bounds = new google.maps.LatLngBounds();
139      map.markers.forEach(function( marker ){
140          bounds.extend({
141              lat: marker.position.lat(),
142              lng: marker.position.lng()
143          });
144      });
145  
146      // Case: Single marker.
147      if( map.markers.length == 1 ){
148          map.setCenter( bounds.getCenter() );
149  
150      // Case: Multiple markers.
151      } else{
152          map.fitBounds( bounds );
153      }
154  }
155  
156  // Render maps on page load.
157  $(document).ready(function(){
158      $('.acf-map').each(function(){
159          var map = initMap( $(this) );
160      });
161  });
162  
163  })(jQuery);

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.