PageSourceSearch

https://centralealumni.com/wp-content/themes/facc-texas/assets/js/custom.js?time=1791169306&ver=1.0

js centralealumni.com collected 2026-10-05 03:27:22 UTC 6,604 bytes, 187 lines download raw bytes

1// var $ = jQuery.noConflict();
2var currentPage = 1;
3
4$(document).on("change", '.filter-location-branch-type select', function(){
5    currentPage = 1;
6    triggerLocationSearch();
7});
8$(document).on("change", '.filter-country select', function(){
9    currentPage = 1;
10    triggerLocationSearch();
11});
12
13
14function triggerLocationSearch() {
15    var filterLocationTypeValue = $('.filter-location-branch-type select').val();
16    var filterCountryValue = $('.filter-country select').val();
17
18    $(".location-list-remove").remove();
19    $(".location-no-found").remove();
20    $(".location-list-loader").show();
21    $('html, body').animate({
22        scrollTop: $(".Filter-block").offset().top
23    }, 100);
24
25    $.ajax({
26        type: "POST",
27        url: localize_data.admin_ajax_url,
28        data: {
29            action: "locations_filter",
30            locationType: filterLocationTypeValue,
31            country: filterCountryValue,
32            page: currentPage
33        },
34        success: function(response){
35            response = JSON.parse(response);
36            $(".location-list-loader").hide();
37            $('#show_locations').html(response.locationsHtml);
38            for (var i = 0; i < markers.length; i++) {
39                markers[i].setMap(null);
40            }
41            console.log('removing all markers');
42            if(response.mapdata){
43            var bounds = new google.maps.LatLngBounds();
44            var infowindow = new google.maps.InfoWindow({
45                content: "",
46                maxWidth: 320,
47                minWidth: 320
48            });
49                for(var j=0;j<response.mapdata.length;j++){
50                    var latitude=response.mapdata[j].latitude;
51                    var longitude=response.mapdata[j].longitude;
52                    var post_id=response.mapdata[j].post_id;
53                    var count=j+1;
54                    var marker = new google.maps.Marker({
55                        map: map,
56                        position: { lat: parseFloat(latitude), lng: parseFloat(longitude) },
57                        icon: '/wp-content/themes/p2energy-theme/assets/images/pointer.png',
58                        label: {text: count.toString(), color: "white", className:"custom_map_label", fontSize:"10px"}
59                    });
60                    bounds.extend(marker   .position);
61                    google.maps.event.addListener(marker, 'click', (function(marker, j) {
62                        return function() {
63                        var html=response.mapdata[j].html;
64                        infowindow.setContent(html);
65                        infowindow.open(map, marker);
66                        }
67                    })(marker, j));
68                    markers.push(marker);
69                    if(filterLocationTypeValue=='' && filterCountryValue==''){
70                        map.setCenter({lat:40.077011430026985, lng:-94.18654089682619});
71                        map.setZoom(4);
72                    }else if(filterCountryValue==''){
73                        map.fitBounds(bounds);
74                        map.setZoom(3);
75                    }else{
76                        map.fitBounds(bounds);
77                        map.setZoom(4);
78                    }
79                    
80                }
81            }
82        }
83    })
84}
85
86//////////////////////////////js for footer tab add class on footer touch
87jQuery(window).on('scroll', function () {
88    var elValFromTop = Math.ceil(jQuery('footer').offset().top),
89    windowHeight = jQuery(window).height(),
90    windowScrollValFromTop = jQuery(this).scrollTop();
91
92    // if the sum of the window height and scroll distance from the top is greater than the target element's distance from the top, it should be in view and the event should fire, otherwise reverse any previously applied methods
93    if (windowHeight + windowScrollValFromTop > elValFromTop) {
94    jQuery('.fix-bottom-resources').addClass('footer-touched');
95    } else {
96    jQuery('.fix-bottom-resources').removeClass('footer-touched');
97    }
98});
99
100
101function get_events_posts(paged) {
102
103    //$('.full-event-list').hide();
104    var paged_value = paged;
105    var postId = $('#postId').val();
106    var filterSearchValue = $('input.events-search').val();
107    var is_insights = $('input#insights_filter').val();
108    var is_magzine = $('input#magzine_filter').val();
109    var action='';
110    if(is_insights){
111        var action='fn_insights_filter';
112    }else if(is_magzine){
113        var action='fn_magzine_filter';
114    }else{
115        var action='fn_events_filter';
116    }
117    var ajax_url = localize_data.admin_ajax_url;
118    $.ajax({
119        type: 'GET',
120        url: ajax_url,
121        data: {
122            action: action,
123            eventCats: getSelectedEventCat,
124            eventType: getSelectedEventType,
125            postnotid: postId,
126            paged: paged_value,
127            search: filterSearchValue,
128        },
129        beforeSend: function () {
130            //Show loader here
131            $('.event-listed').hide();
132            $('.resources-list-loader').fadeIn();
133        },
134        success: function (data) {
135           // response = JSON.parse(data);
136            $('.event-listed').html(data);
137            $('.resources-list-loader').fadeOut();
138            $('.event-listed').show();
139               
140            // setTimeout(function () {
141            //     $('.blog-listing-row').jQueryEqualHeight('.blog-box .blog-img');
142            //     $('.blog-slider').jQueryEqualHeight('.blog-box .blog-img');
143            // }, 600);
144        }
145    });
146}
147
148$(document).on('click', '.rc-pagination ul li a', function (e) {
149    e.preventDefault();
150    
151    var url = $(this).attr('href');
152    var paged = $(this).data("page");
153     $('html, body').animate({
154        scrollTop: $(".network-filter-section").offset().top-50
155    }, 0);
156    get_events_posts(paged); //Load Posts (feed in paged value)
157});
158
159function getSelectedEventCat() {
160    var insightCats = [];
161    $("select#fn_all_category option:selected").each(function () {
162        var val = $(this).val();
163        insightCats.push(val);
164    });
165    return insightCats;
166}
167function getSelectedEventType() {
168    var insightCats = [];
169    $("select#fn_all_type option:selected").each(function () {
170        var val = $(this).val();
171        insightCats.push(val);
172    });
173    return insightCats;
174}
175
176$(document).on("change", 'select#fn_all_type', function(){
177    get_events_posts(1);
178});
179
180$(document).on("change", 'select#fn_all_category', function(){
181    get_events_posts(1);
182});
183
184$(document).on("keyup", 'input.events-search', function(){
185    currentPage = 1;
186    get_events_posts();
187});

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.