PageSourceSearch

https://essays.discount/wp-content/themes/listingpro/assets/js/pricing.js

js essays.discount collected 2026-10-06 13:17:29 UTC 6,935 bytes, 219 lines download raw bytes

1/*--------------------------------- Price plan Hide and show features----------------------------------*/
2
3jQuery(document).ready(function(){
4	
5	
6	jQuery(document).on('click', '.lp-hide-show-price-features', function() {
7    var $this = jQuery(this);
8    jQuery('.lp-hide-show-price-features').text('View All Features');
9
10    if(false == jQuery(this).next().is(':visible')) { //hide current tab when click on other tab
11        //jQuery('.lp-price-list').slideUp(700);
12        jQuery(".lp-hide-show-price-features").removeClass('expanded');
13
14      }
15      
16      $this.toggleClass('MoreDetails');
17
18    if($this.hasClass('MoreDetails')){
19      $this.text('Hide All Features');
20
21      //jQuery(this).closest('.section-lp-price-list').find('.lp-price-list').slideDown(700);
22      jQuery(".lp-price-list").fadeIn('400');
23
24    }else {
25       
26     //jQuery(this).closest('.section-lp-price-list').find('.lp-price-list').slideUp(700);
27    
28     $this.text('View All Features');
29     
30      jQuery(".lp-price-list").fadeOut('400');
31    
32    }
33
34  });
35});
36
37
38/*-------------------Selected Radio Button ----------------*/
39jQuery(document).ready(function () {
40    jQuery('.lp-price-cats-with-icon li input[type=radio]').click(function () {
41        jQuery('.lp-price-cats-with-icon li input[type=radio]:not(:checked)').parent().removeClass("active-category-radio");
42        jQuery('.lp-price-cats-with-icon li input[type=radio]:checked').parent().addClass("active-category-radio");
43    });    
44});
45
46
47jQuery(document).ready(function () {
48    jQuery('.lp-price-cats-with-icon-v2 li input[type=radio]').click(function () {
49        jQuery('.lp-price-cats-with-icon-v2 li input[type=radio]:not(:checked)').parent().removeClass("active-category-radio-v2");
50        jQuery('.lp-price-cats-with-icon-v2 li input[type=radio]:checked').parent().addClass("active-category-radio-v2");
51    });    
52});
53
54// Horizontal view 1 pricing version
55jQuery(document).ready(function () {
56    jQuery(document).on('click', '.horizontal_view_list li input[type=radio]', function(){
57    	
58        jQuery('.horizontal_view_list li input[type=radio]:not(:checked)').parent('label').removeClass("price_plan_active_disable");
59        jQuery('.horizontal_view_list li input[type=radio]:checked').parent('label').addClass("price_plan_active_disable");
60		
61		// Add class for show horizontial view with the reference of this class    
62        jQuery('.lp_hori_view_plan_left_section').removeClass('horizontal_choose_button');
63    	jQuery(this).closest('.lp_hori_view_plan_left_section').addClass('horizontal_choose_button');
64    	// add class for horizontial plan height 
65    	jQuery(this).closest('.lp-horizontial-specific').addClass('lp-horizontial-specific-height');
66    	
67    });
68    // remove class for horizontial plan height
69    jQuery(document).on('click', '.lp-standerd-exlusiv button', function(event) {
70    	jQuery('.lp-horizontial-specific').removeClass('lp-horizontial-specific-height');
71    });
72	jQuery(document).on('click', '.lp_button_switcher span', function(event) {
73     jQuery('.lp-horizontial-specific').removeClass('lp-horizontial-specific-height');
74   });
75
76    jQuery('.horizontal_view_list li:nth(0) input[type=radio]').trigger('click').parent('label').addClass("price_plan_active_disable");
77});
78
79
80
81/*----------------slider for pricing plan category-----------------*/
82
83jQuery(document).ready(function(){
84
85  var x =  jQuery('.lp_category_list_slide').children();
86
87	for (i = 0; i < x.length ; i += 1) {
88		x.slice(i,i+1).wrapAll('<div class="'+ i +'"></div>');
89	}
90  if( jQuery('.lp_category_list_slide').length != 0 )
91  {
92      jQuery('.lp_category_list_slide').slick({
93          slidesToShow: 5,
94          slidesToScroll: 1,
95          prevNext: true,
96          arrows: true,
97          dots: false,
98          responsive: [
99              {
100                  breakpoint: 768,
101                  settings: {
102                      arrows: true,
103                      infinite: false,
104                      slidesToShow: 4,
105                      slidesToScroll: 1
106                  }
107              },
108              {
109                  breakpoint: 481,
110                  settings: {
111                      arrows: true,
112                      infinite: false,
113                      slidesToShow: 3,
114                      slidesToScroll: 1
115                  }
116              },
117
118              {
119                  breakpoint: 390,
120                  settings: {
121                      arrows: true,
122                      infinite: false,
123                      slidesToShow: 2,
124                      slidesToScroll: 1
125                  }
126              }
127          ]
128      });
129  }
130
131});
132
133
134/*--------------- Slider For pricing plan packages--------------*/
135
136
137/*jQuery(document).ready(function(){
138  jQuery('.slider_pricing_Plan').slick({
139   slidesToShow: 3,
140   slidesToScroll: 1,
141  arrows: true,
142  fade: true,
143  dots: true,
144  arrows:true
145  });
146});*/
147
148
149/*----------Drop down Category list for pricing plan-------------------*/
150
151jQuery(document).ready(function() {
152	//jQuery("#category_dropdown").select2({minimumResultsForSearch: -1});
153
154	jQuery('#category_dropdown').on('select2:select', function (e) {
155
156		$this = jQuery(this);
157			jQuery("body").addClass("listingpro-loading");
158			jQuery('#cats-selected-plans').html('');
159			var templatestyle = jQuery(this).closest('#select_style').data('style');
160
161			jQuery.ajax({
162						type: 'POST',
163						dataType: 'json',
164						url: ajax_term_object.ajaxurl,
165						data: { 
166							'action': 'listingpro_select_plan_by_cat', 
167							'term_id': $this.val(), 
168							'templatestyle': templatestyle,
169							},
170						success: function(data){
171							jQuery("body").removeClass("listingpro-loading");
172							if(data.plans){
173								jQuery('#cats-selected-plans').html(data.plans);
174								var $hiddenField = '<input type="hidden" name="lp_pre_selected_cats" value="'+$this.val()+'" />';
175								jQuery( $hiddenField ).appendTo( ".price-plan-button" );
176							}
177						}
178			});
179	});
180
181});
182
183
184// Pricing Plan tool tip 
185
186jQuery(document).ready(function() {
187
188
189	jQuery('.tooltip_price_features span').on('mouseover', function(){
190	var $this = jQuery(this);
191	$this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","visible");
192
193	});
194
195	jQuery('.tooltip_price_features span').on('mouseout', function(){
196	var $this = jQuery(this);
197	$this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","hidden");
198
199	});
200
201});
202
203// Pricing Plan tool tip  for ajax response
204
205jQuery(document).ready(function() {
206
207	jQuery(document).on('mouseover', '.tooltip_price_features span', function(){
208	var $this = jQuery(this);
209	$this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","visible");
210
211	});
212
213	jQuery(document).on('mouseout', '.tooltip_price_features span', function(){
214	var $this = jQuery(this);
215	$this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","hidden");
216
217	});
218});
219

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.