PageSourceSearch

https://bakersfieldschoice.com/wp-content/themes/listingpro-child-…/assets/js/child-script.js?ver=1790253510

js bakersfieldschoice.com collected 2026-09-24 12:40:21 UTC 4,921 bytes, 138 lines download raw bytes

1jQuery(document).ready(function(){
2	jQuery(document).on('click','.newest_slider_content .remove-fav-v2',function(){
3		$this = jQuery(this);
4		jQuery(document).ajaxSuccess(function(event,request,settings){
5	          var data =  request.responseJSON.remove;
6	          if(data == 'yes'){
7	            jQuery($this).find('i').removeClass('fa-heart');
8	          }
9	    });
10	});
11
12	jQuery(document).on('click','.popular_slider_content .remove-fav-v2',function(){
13					$this = jQuery(this);
14		jQuery(document).ajaxSuccess(function(event,request,settings){
15	          var data =  request.responseJSON.remove;
16	          if(data == 'yes'){
17	            jQuery($this).find('i').removeClass('fa-heart');
18	          }
19	    });
20	});
21
22	jQuery("#home_search").select2({
23	    placeholder: "Find Bakersfield’s local business",
24	    allowClear: true
25	});
26
27
28	jQuery(document).on('click','.leaderboard-item-view-all-btn',function(){
29		jQuery(this).siblings('li.hiderow').slideToggle('slow','linear');
30
31		if(jQuery(this).children('a').text() === 'View All'){
32			jQuery(this).children('a').text('View Less');
33		}else{
34			jQuery(this).children('a').text('View All');
35		}
36	});
37});
38
39
40jQuery("#business_logo").on("change",function(){
41 
42      /* Current this object refer to input element */         
43      var $input = jQuery(this);
44      var reader = new FileReader(); 
45      reader.onload = function(event){
46		var img = new Image();
47		img.src = event.target.result;
48		img.onload = function() {
49			var width = this.width;
50			var height = this.height;
51			console.log('width => '+width+' height => '+height);
52			if( $input[0].files[0].size >= 1000000){
53				alert('Business logo size should be less than 1 MB.');
54				jQuery("#business_logo").val('');
55			  	jQuery(".custom-file label span").text('Choose a file…');
56				return false;
57
58			}else{
59				if (width !== 387 && height !== 250) {
60					alert('Business logo should be 387X250px');
61					jQuery("#business_logo").val('');
62					jQuery(".custom-file label span").text('Choose a file…');
63					return false;
64				}
65			  jQuery("#preview-image").attr("src", reader.result);
66			  jQuery("#img_preview").show();
67			}
68		};
69      } 
70
71      reader.readAsDataURL($input[0].files[0]);
72 });
73
74jQuery("#img_preview i").click(function(){
75	jQuery("#img_preview").hide();
76	jQuery("#business_logo").val('');
77	jQuery(".custom-file label span").text('Choose a file…');
78});
79
80/*
81* Fix sidebar at some point and remove
82* fixed position at content bottom
83*/
84
85
86// jQuery(window).scroll(function () {
87// 	console.log('scroll init')
88// 	var headerHeight = jQuery('.tax-listing-category .custom_header').innerHeight();
89
90// 	var contentHeight = jQuery('#mainwrap_listings .rightbar').innerHeight();
91// 	var sidebarHeight = jQuery('.business_list_main .leftbar').height();
92//   	var sidebarBottomPos = contentHeight - sidebarHeight; 
93
94//   	var trigger = jQuery(window).scrollTop() - headerHeight;
95//       	if (jQuery(window).scrollTop() >= headerHeight) {
96//           	jQuery('.business_list_main .leftbar').addClass('fixed');
97//           	jQuery('#mainwrap_listings .rightbar').addClass('rightbar-sticy');
98//       	} else {
99//           	jQuery('.business_list_main .leftbar').removeClass('fixed');
100//           	jQuery('#mainwrap_listings .rightbar').removeClass('rightbar-sticy');
101//       	}
102
103// });
104
105// jQuery(window).scroll(function () {
106// 	console.log('scroll init2')
107// 	var headerHeight = jQuery('.tax-listing-category .custom_header').innerHeight();
108
109// 	var contentHeight = jQuery('#mainwrap_listings .rightbar').innerHeight();
110// 	var sidebarHeight = jQuery('.ajax-maps-area #show_map_here').height();
111//   	var sidebarBottomPos = contentHeight - sidebarHeight; 
112
113//   	var trigger = jQuery(window).scrollTop() - headerHeight;
114//       	if (jQuery(window).scrollTop() >= headerHeight) {
115//           	jQuery('.ajax-maps-area #show_map_here').addClass('fixed');
116//           	jQuery('#mainwrap_listings .rightbar').addClass('rightbar-sticy');
117//       	} else {
118//           	jQuery('.ajax-maps-area #show_map_here').removeClass('fixed');
119//           	jQuery('#mainwrap_listings .rightbar').removeClass('rightbar-sticy');
120//       	}
121
122// });
123
124
125jQuery(window).on('scroll',function(){
126    if (jQuery(this).scrollTop() >= 400) {
127       jQuery('#mainwrap_listings .rightbar').addClass('rightbar-sticy');
128       jQuery('.business_list_main .leftbar').addClass('fixed');
129       jQuery('#show_map_here').addClass('fixed');
130       jQuery('.ajax-maps-area').addClass('rightbar-sticy');
131    }else {
132       jQuery('#mainwrap_listings .rightbar').removeClass('rightbar-sticy');
133       jQuery('.business_list_main .leftbar').removeClass('fixed');
134        jQuery('#show_map_here').removeClass('fixed');
135       jQuery('.ajax-maps-area').removeClass('rightbar-sticy');
136    }
137
138});

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.