PluginProbe ʕ •ᴥ•ʔ
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) / 2.7.2
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) v2.7.2
2.9.1 2.9.0 2.8.9 2.8.8 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 2.0 2.0.1 2.0.3 2.0.4 2.0.5 2.0.6 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7
mystickymenu / js / mystickymenu-admin.js
mystickymenu / js Last commit date
morphext 2 years ago detectmobilebrowser.js 2 years ago iris-script.js 2 years ago jquery.star-rating-svg.min.js 3 years ago mystickymenu-admin.js 2 years ago mystickymenu.js 2 years ago mystickymenu.min.js 5 years ago select2.min.js 2 years ago slick.min.js 2 years ago welcomebar-front.js 2 years ago
mystickymenu-admin.js
1049 lines
1 (function( $ ) {
2 "use strict";
3
4 jQuery(document).ready(function($){
5
6 $(document).on("click", ".updates-form button", function(){
7 var updateStatus = 0;
8 if($(this).hasClass("yes")) {
9 updateStatus = 1;
10 }
11 $(".updates-form button").attr("disabled", true);
12 $.ajax({
13 url: ajaxurl,
14 data: {
15 action: "sticky_menu_update_status",
16 status: updateStatus,
17 nonce: $("#myStickymenu_update_nonce").val(),
18 email: $("#myStickymenu_update_email").val()
19 },
20 type: 'post',
21 cache: false,
22 success: function(){
23 window.location.reload();
24 }
25 })
26 });
27
28 $(document).on("click", ".skip-dolatter", function(){
29 var updateStatus = 0;
30 $(".updates-form button").attr("disabled", true);
31 $.ajax({
32 url: ajaxurl,
33 data: {
34 action: "sticky_menu_update_status",
35 status: updateStatus,
36 nonce: $("#myStickymenu_update_nonce").val(),
37 email: $("#myStickymenu_update_email").val()
38 },
39 type: 'post',
40 cache: false,
41 success: function(){
42 window.location.reload();
43 }
44 })
45 });
46
47 var handle = $( "#custom-handle" );
48 $( "#slider" ).slider({
49 create: function() {
50 handle.text( $( this ).slider( "value" ) );
51 handle.text( $('#myfixed_opacity').val() );
52 handle.css('left', $('#myfixed_opacity').val() + '%')
53 },
54 slide: function( event, ui ) {
55 $('#myfixed_opacity').val(ui.value);
56 handle.text( ui.value );
57 }
58 });
59 jQuery(
60 '<div class="pt_number"><div class="pt_numberbutton pt_numberup">+</div><div class="pt_numberbutton pt_numberdown">-</div></div>'
61 ).insertAfter("input.mysticky-number1");
62
63 jQuery(".mystickynumber1").each(function() {
64
65 var spinner = jQuery(this),
66 input = spinner.find('input[type="number"]'),
67 btnUp = spinner.find(".pt_numberup"),
68 btnDown = spinner.find(".pt_numberdown"),
69 min = input.attr("min"),
70 max = input.attr("max"),
71 valOfAmout = input.val(),
72 newVal = 0;
73
74 btnUp.on("click", function() {
75
76 var oldValue = parseFloat(input.val());
77
78 if (oldValue >= max) {
79 var newVal = oldValue;
80 } else {
81 var newVal = oldValue + 1;
82 }
83 spinner.find("input").val(newVal);
84 spinner.find("input").trigger("change");
85 });
86 btnDown.on("click", function() {
87 var oldValue = parseFloat(input.val());
88 if (oldValue <= min) {
89 var newVal = oldValue;
90 } else {
91 var newVal = oldValue - 1;
92 }
93 spinner.find("input").val(newVal);
94 spinner.find("input").trigger("change");
95 });
96 });
97
98
99 $(".confirm").on( 'click', function() {
100 return window.confirm("Reset to default settings?");
101 });
102
103 var flag = 0;
104 $( "#mystickymenu-select option" ).each(function( i ) {
105
106 if ($('select#mystickymenu-select option:selected').val() !== '' ) {
107 flag = 1;
108 }
109 if( $('select#mystickymenu-select option:selected').val() == $(this).val() ){
110 $('#mysticky_class_selector').show();
111 }else {
112 $('#mysticky_class_selector').hide();
113 }
114 });
115 if ( flag === 0 ) {
116 $('#mysticky_class_selector').show();
117 $("select#mystickymenu-select option[value=custom]").attr('selected', 'selected');
118 }
119
120 $("#mystickymenu-select").on( 'change', function() {
121 if ($(this).val() == 'custom' ) {
122 $('#mysticky_class_selector').show();
123 }else {
124 $('#mysticky_class_selector').hide();
125 }
126
127 });
128 /*02-08-2019 welcom bar js*/
129
130 var bar_action_previous;
131 $( '.mysticky-welcomebar-action' ).on('focus', function () {
132 // Store the current value on focus and on change
133 bar_action_previous = this.value;
134 }).change(function() {
135 var mysticky_welcomebar_action = $( this ).val();
136
137 if ( mysticky_welcomebar_action == 'redirect_to_url' ) {
138 $( '.mysticky-welcomebar-redirect' ).show();
139 $( '.mysticky-welcomebar-redirect-container' ).show();
140 } else {
141 $( '.mysticky-welcomebar-redirect' ).hide();
142 $( '.mysticky-welcomebar-redirect-container' ).hide();
143 }
144 if ( mysticky_welcomebar_action == 'poptin_popup' ) {
145 $( '.mysticky-welcomebar-poptin-popup' ).show();
146 } else {
147 $( '.mysticky-welcomebar-poptin-popup' ).hide();
148 }
149 if ( $('.mysticky-welcomebar-action option:selected').attr('data-href') !== '' && mysticky_welcomebar_action == 'thankyou_screen' ) {
150 window.open( $( '.mysticky-welcomebar-action option:selected' ).attr('data-href') , '_blank');
151 $('.mysticky-welcomebar-action').val( bar_action_previous ).change();
152 console.log(bar_action_previous);
153 }
154 bar_action_previous = this.value;
155
156 });
157
158 var page_option_content = "";
159 page_option_content = $( '.mysticky-welcomebar-page-options-html' ).html();
160 $( '.mysticky-welcomebar-page-options-html' ).remove();
161
162 $( '#create-rule' ).on( 'click', function(){
163 var append_html = page_option_content.replace(/__count__/g, '1', page_option_content);
164 $( '.mysticky-welcomebar-page-options' ).append( append_html );
165 $( '.mysticky-welcomebar-page-options' ).show();
166 $( this ).parent().remove();
167 });
168 $( '.sticky-header-menu ul li a' ).on( 'click', function(){
169 if ( $( "#sticky-header-welcome-bar" ).is( ":visible" ) ) {
170 check_for_preview_pos();
171 }
172 } );
173 jQuery(window).on('scroll', function(){
174 if ( $( "#sticky-header-welcome-bar" ).is( ":visible" ) ) {
175 check_for_preview_pos();
176 }
177 });
178 /*Mysticky page target*/
179 var mysticky_total_page_option = 0;
180 var mysticky_page_option_content = "";
181 mysticky_total_page_option = $( '.mysticky-page-option' ).length;
182 mysticky_page_option_content = $( '.mysticky-page-options-html' ).html();
183 $( '.mysticky-page-options-html' ).remove();
184
185 $( '#mysticky_create-rule' ).on( 'click', function(){
186
187 var append_html = mysticky_page_option_content.replace(/__count__/g, mysticky_total_page_option, mysticky_page_option_content);
188 mysticky_total_page_option++;
189 $( '.mysticky-page-options' ).append( append_html );
190 $( '.mysticky-page-options .mysticky-page-option' ).removeClass( 'last' );
191 $( '.mysticky-page-options .mysticky-page-option:last' ).addClass( 'last' );
192
193 if( $( '.mysticky-page-option .myStickymenu-upgrade' ).length > 0 ) {
194 $( this ).remove();
195 }
196 });
197 $( document ).on( 'click', '.mysticky-remove-rule', function() {
198 $( this ).closest( '.mysticky-page-option' ).remove();
199 $( '.mysticky-page-options .mysticky-page-option' ).removeClass( 'last' );
200 $( '.mysticky-page-options .mysticky-page-option:last' ).addClass( 'last' );
201 });
202 $( document ).on( 'change', '.mysticky-url-options', function() {
203 var current_val = jQuery( this ).val();
204 var mysticky_welcomebar_siteURL = jQuery( '#mysticky_welcomebar_site_url' ).val();
205 var mysticky_welcomebar_newURL = mysticky_welcomebar_siteURL;
206 if( current_val == 'page_has_url' ) {
207 mysticky_welcomebar_newURL = mysticky_welcomebar_siteURL;
208 } else if( current_val == 'page_contains' ) {
209 mysticky_welcomebar_newURL = mysticky_welcomebar_siteURL + '%s%';
210 } else if( current_val == 'page_start_with' ) {
211 mysticky_welcomebar_newURL = mysticky_welcomebar_siteURL + 's%';
212 } else if( current_val == 'page_end_with' ) {
213 mysticky_welcomebar_newURL = mysticky_welcomebar_siteURL + '%s';
214 }
215 $( this ).closest( '.url-content' ).find( '.mysticky-welcomebar-url' ).text( mysticky_welcomebar_newURL );
216 });
217 /* welcome bar live preview */
218 /* Apply Wp Color Picker */
219 var myOptions = {
220 change: function(event, ui){
221 var color_id = $(this).attr('id');
222 var slug = $(this).data('slug');
223
224 var color_code = ui.color.toString();
225 if ( color_id === 'mysticky_welcomebar_bgcolor'){
226 $('.mysticky-welcomebar-fixed').css('background-color', color_code );
227 }
228 if ( color_id === 'mysticky_welcomebar_bgtxtcolor'){
229 $('.mysticky-welcomebar-fixed .mysticky-welcomebar-content p').css('color', color_code );
230 }
231 if ( color_id === 'mysticky_welcomebar_btncolor'){
232 $('.mysticky-welcomebar-btn a').css('background-color', color_code );
233 }
234 if ( color_id === 'mysticky_welcomebar_btntxtcolor'){
235 $('.mysticky-welcomebar-btn a').css('color', color_code );
236 }
237 if( color_id === 'mysticky_welcomebar_xcolor' ){
238 $(".mysticky-welcomebar-close").css('color',color_code);
239 }
240 }
241 };
242 $('.mysticky-welcomebar-setting-wrap .my-color-field').wpColorPicker(myOptions);
243
244 $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_x_desktop]"]' ).on( 'change', function(){
245 if( $( this ).prop( "checked" ) == true ) {
246 $( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-showx-desktop' );
247 } else {
248 $( '.mysticky-welcomebar-fixed' ).removeClass( 'mysticky-welcomebar-showx-desktop' );
249 }
250 } );
251 $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_x_mobile]"]' ).on( 'change', function(){
252 if( $( this ).prop( "checked" ) == true ) {
253 $( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-showx-mobile' );
254 } else {
255 $( '.mysticky-welcomebar-fixed' ).removeClass( 'mysticky-welcomebar-showx-mobile' );
256 }
257 } );
258
259 $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_btn_desktop]"]' ).on( 'change', function(){
260 if( $( this ).prop( "checked" ) == true ) {
261 $( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-btn-desktop' );
262 } else {
263 $( '.mysticky-welcomebar-fixed' ).removeClass( 'mysticky-welcomebar-btn-desktop' );
264 }
265
266 if( $( this ).prop( "checked" ) == false && $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_btn_mobile]"]' ).prop( "checked" ) == false ) {
267 $( ".mysticky_welcomebar_disable, .mysticky_welcomebar_btn_color button.wp-color-result" ).css({
268 'pointer-events': 'none',
269 'opacity': '0.5'
270 });
271 } else {
272 $( ".mysticky_welcomebar_disable, .mysticky_welcomebar_btn_color button.wp-color-result" ).css({
273 'pointer-events': '',
274 'opacity': ''
275 });
276 }
277 } );
278
279 $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_btn_mobile]"]' ).on( 'change', function(){
280 if( $( this ).prop( "checked" ) == true ) {
281 $( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-btn-mobile' );
282 } else {
283 $( '.mysticky-welcomebar-fixed' ).removeClass( 'mysticky-welcomebar-btn-mobile' );
284 }
285
286 if( $( this ).prop( "checked" ) == false && $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_btn_desktop]"]' ).prop( "checked" ) == false ) {
287 $( ".mysticky_welcomebar_disable, .mysticky_welcomebar_btn_color button.wp-color-result" ).css({
288 'pointer-events': 'none',
289 'opacity': '0.5'
290 });
291 } else {
292 $( ".mysticky_welcomebar_disable, .mysticky_welcomebar_btn_color button.wp-color-result" ).css({
293 'pointer-events': '',
294 'opacity': ''
295 });
296 }
297 } );
298 if( $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_btn_desktop]"]' ).prop( "checked" ) == false && $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_btn_mobile]"]' ).prop( "checked" ) == false ) {
299 $( ".mysticky_welcomebar_disable, .mysticky_welcomebar_btn_color button.wp-color-result" ).css({
300 'pointer-events': 'none',
301 'opacity': '0.5'
302 });
303 } else {
304 $( ".mysticky_welcomebar_disable, .mysticky_welcomebar_btn_color button.wp-color-result" ).css({
305 'pointer-events': '',
306 'opacity': ''
307 });
308 }
309
310 $( 'select[name="mysticky_option_welcomebar[mysticky_welcomebar_font]"]' ).on( 'change', function(){
311 var myfixed_font_val = $( this ).val();
312 if( myfixed_font_val == 'System Stack'){
313 myfixed_font_val = '-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
314 }
315 $( 'head' ).append( '<link href="https://fonts.googleapis.com/css?family='+ myfixed_font_val +':400,600,700" rel="stylesheet" type="text/css" class="sfba-google-font">' );
316 $( '.mysticky-welcomebar-fixed' ).css( 'font-family', myfixed_font_val );
317 } );
318
319 $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_fontsize]"]' ).on( 'keyup click', function(){
320 var mysticky_welcomebar_fontsize_val = $( this ).val();
321 $( '.mysticky-welcomebar-fixed p' ).css( 'font-size', mysticky_welcomebar_fontsize_val + 'px' );
322 $( '.mysticky-welcomebar-btn a' ).css( 'font-size', mysticky_welcomebar_fontsize_val + 'px' );
323 } );
324
325 $( '#wp-mysticky_bar_text-wrap .wp-editor-tabs button' ).on( 'click', function(){
326 if ( $("#wp-mysticky_bar_text-wrap").hasClass("tmce-active") ){
327
328 }
329 } );
330
331 $( document ).on( 'click', '#qt_mysticky_bar_text_toolbar .ed_button', function(){
332 $( 'textarea[name="mysticky_option_welcomebar[mysticky_welcomebar_bar_text]"]' ).trigger( 'change keyup click' );
333 } );
334
335 /* Static Text */
336 var mysticky_bar_text_val = $( 'textarea[name="mysticky_option_welcomebar[mysticky_welcomebar_bar_text]"]' ).val().replace(/(?:\r\n|\r|\n)/g, '<br />');
337 mysticky_bar_text_val = mysticky_bar_text_val.replace(/(?:onchange|onclick|onmouseover|onmouseout|onkeydown|onload\onerror|alert|iframe)/g, '');
338 $( '.mysticky-welcomebar-content p.mysticky-welcomebar-static_text' ).html( mysticky_bar_text_val );
339 $( 'textarea[name="mysticky_option_welcomebar[mysticky_welcomebar_bar_text]"]' ).on( 'change keyup click', function(){
340 var mysticky_bar_text_val = $( this ).val().replace(/(?:\r\n|\r|\n)/g, '<br />');
341 mysticky_bar_text_val = mysticky_bar_text_val.replace(/(?:onchange|onclick|onmouseover|onmouseout|onkeydown|onload\onerror|alert|iframe)/g, '');
342 $( '.mysticky-welcomebar-content p.mysticky-welcomebar-static_text' ).html( mysticky_bar_text_val );
343 console.log(mysticky_bar_text_val);
344 $('.mysticky-welcomebar-fixed .mysticky-welcomebar-content p.mysticky-welcomebar-static_text').css('color', $('#mysticky_welcomebar_bgtxtcolor').val() );
345 $( '.mysticky-welcomebar-fixed p.mysticky-welcomebar-static_text' ).css( 'font-size', $('#mysticky_welcomebar_fontsize').val() + 'px' );
346 } );
347 /* Sliding Text */
348 $( document ).on( 'change keyup click', 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_slider_text][]"]' , function(){
349 var sliding_text = '';
350 $('input[name="mysticky_option_welcomebar[mysticky_welcomebar_slider_text][]"]').each(function(index) {
351 sliding_text += '"' + $(this).val() + '",';
352 });
353 var slider_transition = $( 'select[name="mysticky_option_welcomebar[mysticky_welcomebar_slider_transition]"]' ).val();
354 $('.mysticky-welcomebar-animation-transition').html('<span class="mysticky-welcomebar-animation-text" data-morphext-options=\'{"animation": "'+ slider_transition +'", "phrases": [' + sliding_text.slice(0, -1) + '], "speed":"3500"}\'></span>')
355 jQuery(".mysticky-welcomebar-animation-transition .mysticky-welcomebar-animation-text").morphext();
356 });
357
358 $( document ).on( 'change', 'select[name="mysticky_option_welcomebar[mysticky_welcomebar_slider_transition]"]' , function(){
359 var sliding_text = '';
360 $('input[name="mysticky_option_welcomebar[mysticky_welcomebar_slider_text][]"]').each(function(index) {
361 sliding_text += '"' + $(this).val() + '",';
362 });
363 var slider_transition = $( 'select[name="mysticky_option_welcomebar[mysticky_welcomebar_slider_transition]"]' ).val();
364 $('.mysticky-welcomebar-animation-transition').html('<span class="mysticky-welcomebar-animation-text" data-morphext-options=\'{"animation": "'+ slider_transition +'", "phrases": [' + sliding_text.slice(0, -1) + '], "speed":"3500"}\'></span>')
365 jQuery(".mysticky-welcomebar-animation-transition .mysticky-welcomebar-animation-text").morphext();
366 });
367
368 $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_btn_text]"]' ).on( 'keyup', function(){
369 var mysticky_btn_text_val = $( this ).val();
370 $( '.mysticky-welcomebar-btn a' ).text( mysticky_btn_text_val );
371 } );
372
373 /* DATE: 11-12-2019 start */
374 $( 'select[name="mysticky_option_welcomebar[mysticky_welcomebar_attentionselect]"]' ).on( 'change', function(){
375 $(".mysticky-welcomebar-fixed").removeClass (function (index, className) {
376 return (className.match (/(^|\s)mysticky-welcomebar-attention-\S+/g) || []).join(' ');
377 });
378 $( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-attention-' + $(this).val() );
379
380 } );
381 /* DATE: 11-12-2019 End */
382 $("#myStickymenu-entry-effect").on( 'change', function() {
383 $(".mysticky-welcomebar-preview-screen .mysticky-welcomebar-fixed").removeClass('entry-effect');
384 $(".mysticky-welcomebar-fixed").removeClass (function (index, className) {
385 return (className.match (/(^|\s)mysticky-welcomebar-entry-effect-\S+/g) || []).join(' ');
386 });
387 $( '.mysticky-welcomebar-preview-screen .mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-entry-effect-' + $(this).val() );
388 setTimeout( function(){
389 $(".mysticky-welcomebar-preview-screen .mysticky-welcomebar-fixed").addClass('entry-effect');
390 }, 1000 );
391
392 });
393 $( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
394
395 jQuery(".mysticky-welcomebar-animation-transition .mysticky-welcomebar-animation-text").morphext();
396
397 });
398 $( window ).on('load', function(){
399 $( '.mysticky-welcomebar-url-options' ).each( function(){
400 $( this ).trigger( 'change' );
401 });
402 });
403
404
405 /* Preview section part maintain sticky using "check_for_preview_pos" function */
406
407 function check_for_preview_pos() {
408
409 var $window = $(window);
410 var windowsize = $window.width();
411
412 var mysticky_welcomebar_form_pos = $( '#sticky-header-welcome-bar' ).offset().top;
413 if($(".show-on-apper").length && $(".mysticky-welcomebar-setting-right").length) {
414 var topPos = $(".show-on-apper").offset().top - $(window).scrollTop() - 750;
415 if (topPos < 0) {
416 topPos = Math.abs(topPos);
417 jQuery(".mysticky-welcomebar-setting-right").css("margin-top", ((-1)*topPos)+"px");
418 } else {
419 jQuery(".mysticky-welcomebar-setting-right").css("margin-top", "0");
420 }
421 }
422
423 var position_screen = (isRtl == 1 ) ? 'left' : 'right';
424
425 if ( ( mysticky_welcomebar_form_pos + 32 ) < $(window).scrollTop() ) {
426 $( '.mysticky-welcomebar-setting-right' ).css( 'position', 'fixed' );
427 $( '.mysticky-welcomebar-setting-right' ).css( position_screen, '40px' );
428
429 if ( windowsize < 1181 && windowsize > 768 && position_screen == 'right' ) {
430 $( '.mysticky-welcomebar-setting-right' ).css( position_screen, '30px' );
431
432 }else if ( windowsize <= 768 && position_screen == 'right' ) {
433 $( '.mysticky-welcomebar-setting-right' ).css( position_screen, '25px' );
434 }
435
436 if ( windowsize < 1181 && windowsize > 768 && position_screen == 'left') {
437 $( '.mysticky-welcomebar-setting-right' ).css( position_screen, '30px' );
438 }else if ( windowsize <= 768 && position_screen == 'left') {
439 $( '.mysticky-welcomebar-setting-right' ).css( position_screen, '25px' );
440 }
441 } else {
442 $( '.mysticky-welcomebar-setting-right' ).css( 'position', 'absolute' );
443 $( '.mysticky-welcomebar-setting-right' ).css( position_screen, '20px' );
444
445 if ( windowsize < 1181 && position_screen == 'right') {
446 $( '.mysticky-welcomebar-setting-right' ).css( position_screen, '10px' );
447 }
448
449 if ( windowsize < 1181 && position_screen == 'left') {
450 $( '.mysticky-welcomebar-setting-right' ).css( position_screen, '10px' );
451 }
452 }
453
454
455 }
456
457 jQuery(document).on("click",".mystickymenu-delete-widget",function(e){
458 e.preventDefault();
459
460 var widget_id = jQuery(this).data("widget-id");
461 jQuery("#widget-delete-dialog-"+widget_id).show();
462 jQuery("#mystickymenu-delete-popup-overlay-"+widget_id).show();
463 });
464
465 /* Mystickymenu: Dashbaord table delete button click action */
466
467 jQuery(document).on("click",".btn-delete",function(e){
468 e.preventDefault();
469 var delWidId = jQuery(this).data("id");
470 jQuery.ajax({
471 url: ajaxurl,
472 type:'post',
473 data: 'action=stickymenu_widget_delete&widget_id=' + delWidId + '&widget_delete=1&wpnonce=' + mystickymenu.ajax_nonce,
474 success: function( data ){
475 $( '#stickymenu-widget-' + delWidId ).remove();
476 setTimeout('location.reload()', 500);
477 },
478 });
479 });
480
481
482 jQuery(document).on("click",".btn-delete-cancel",function(e){
483 e.preventDefault();
484 var id = jQuery(this).data("id");
485 jQuery("#widget-delete-dialog-"+id).hide();
486 jQuery("#mystickymenu-delete-popup-overlay-"+id).hide();
487 });
488
489 /* Mystickymenu: Dashbaord table welcombar widget status change action */
490
491 jQuery(document).on("click",".mystickymenu-widget-enabled",function(){
492 var widget_id = $(this).data('id');
493 if(jQuery(this).prop("checked") != true){
494 jQuery('#widget-status-dialog-' + widget_id).show();
495 jQuery('#mystickymenu-status-popup-overlay-' + widget_id).show();
496 }else{
497 var widget_status = 1;
498 set_widget_status( widget_id, widget_status );
499 }
500 });
501
502 jQuery(document).on("click",".btn-turnoff-status",function(e){
503 e.preventDefault();
504 var widget_id = $(this).data('id');
505
506 if ( typeof widget_id !== "undefined") {
507 var widget_status = 0;
508 set_widget_status( widget_id, widget_status );
509 }
510
511 });
512
513
514 jQuery(document).on("click",".btn-nevermind-status",function(e){
515 e.preventDefault();
516 var widget_id = $(this).data('id');
517 if ( typeof widget_id !== "undefined") {
518 var widget_status = 1;
519 set_widget_status( widget_id, widget_status );
520 jQuery("#mystickymenu-widget-enabled-"+widget_id).prop('checked', true)
521 }
522
523 });
524
525 jQuery(document).on("click",".mystickymenupopup-overlay",function(e){
526 e.preventDefault();
527
528 if(jQuery(this).data("fromoverlay") == 'welcombar_delete'){
529 jQuery(this).hide();
530 var delId = jQuery(this).data('id');
531 jQuery('#widget-delete-dialog-'+delId).hide();
532 }
533 });
534
535 jQuery(document).on("click",".mystickymenupopup-widget-status-overlay",function(e){
536 e.preventDefault();
537 var widget_id = $(this).data('id');
538 var widget_status = 1;
539 set_widget_status( widget_id, widget_status );
540 jQuery("#mystickymenu-widget-enabled-"+widget_id).prop('checked', true);
541
542 });
543
544 function set_widget_status( widget_id, widget_status ) {
545 jQuery.ajax({
546 url: ajaxurl,
547 type:'post',
548 data: 'action=mystickymenu_widget_status&widget_id='+widget_id+'&widget_status=' + widget_status +'&wpnonce=' + mystickymenu.ajax_nonce,
549 success: function( data ){
550 $('#widget-status-dialog-' + widget_id).hide();
551 $('#mystickymenu-status-popup-overlay-' + widget_id).hide();
552 },
553 });
554 }
555
556 jQuery(document).on("click","#close-first-popup, .btn-close-dashboard",function(e){
557 e.preventDefault();
558 jQuery('.first-widget-popup').hide();
559 jQuery('.mystickymenupopup-overlay').hide();
560 });
561
562 jQuery(document).on("click","#first_widget_overlay",function(){
563 jQuery('.first-widget-popup').hide();
564 jQuery(this).hide();
565 });
566
567
568
569 jQuery(document).on("click","#btn-config-disable",function(e){
570 e.preventDefault();
571 jQuery("#stickymenu_status_popupbox").show();
572 jQuery("#stickymenuconfig-overlay-popup").show();
573 });
574
575 jQuery(document).on("click","#stickymenuconfig-overlay-popup",function(){
576 jQuery("#stickymenu_status_popupbox").hide();
577 jQuery(this).hide();
578 });
579
580 jQuery(document).on("click","#stickymenu_status_turnoff",function(e){
581 e.preventDefault();
582 var stickymenu_status = 0;
583 set_stickymenu_status( stickymenu_status );
584 });
585
586 jQuery(document).on("click","#stickymenu_status_nevermind",function(e){
587 e.preventDefault();
588 jQuery("#stickymenu_status_popupbox").hide();
589 jQuery("#stickymenuconfig-overlay-popup").hide();
590 });
591
592 function set_stickymenu_status( stickymenu_status ){
593 jQuery.ajax({
594 url: ajaxurl,
595 type:'post',
596 data: 'action=stickymenu_status_update&stickymenu_status=' + stickymenu_status +'&wpnonce=' + mystickymenu.ajax_nonce,
597 success: function( data ){
598 location.reload();
599 },
600 });
601 }
602
603 jQuery(document).on("click",".close-button",function(){
604 if(jQuery(this).data("from") == 'welcome-bar-status'){
605 var id = jQuery(this).data("id");
606 jQuery("#widget-status-dialog-"+id).hide();
607 jQuery("#mystickymenu-status-popup-overlay-"+id).hide();
608 var widget_status = 1;
609 set_widget_status( id, widget_status );
610 jQuery("#mystickymenu-widget-enabled-"+id).prop('checked', true)
611
612 }else if( jQuery(this).data("from") == "stickymenu-status"){
613 jQuery("#stickymenu_status_popupbox").hide();
614 jQuery("#stickymenuconfig-overlay-popup").hide();
615
616 }else if( jQuery(this).data("from") == "stickymenu-confirm" ){
617 jQuery("#mysticky-sticky-save-confirm").hide();
618 jQuery("#stickymenu-option-overlay-popup").hide();
619 }else if( jQuery(this).data("from") == "welcombar-confirm" ){
620 jQuery("#welcomebar-save-confirm").hide();
621 jQuery("#welcombar-sbmtvalidation-overlay-popup").hide();
622 }else{
623 var id = jQuery(this).data("id");
624 jQuery("#widget-delete-dialog-"+id).hide();
625 jQuery("#mystickymenu-delete-popup-overlay-"+id).hide();
626 }
627 });
628
629
630 jQuery(document).on("click","#stickymenu-option-overlay-popup",function(){
631 $("#mysticky-sticky-save-confirm").hide();
632 $(this).hide();
633 });
634
635
636 jQuery(document).on("click","#welcombar-sbmtvalidation-overlay-popup",function(){
637 $("#welcomebar-save-confirm").hide();
638 $(this).hide();
639 });
640
641
642 jQuery(document).on("change","#mysticky-welcomebar-countdown-enabled",function(){
643 var url = jQuery(this).data("url");
644 jQuery(this).prop('checked',false);
645 window.open(url, '_blank');
646 });
647
648 jQuery(document).on("click",".btn-save-stickymenu" , function(event){
649 if ( $( '#mysticky-stickymenu-form-enabled' ).prop( 'checked' ) == false && $('#save_stickymenu').val() == "" ) {
650 event.preventDefault();
651 $("#mysticky-sticky-save-confirm").show();
652 $("#stickymenu-option-overlay-popup").show();
653
654 $('#stickymenu_status_ok').attr('data-clickfrom', 'save');
655 $('#stickymenu_status_dolater').attr('data-clickfrom', 'save');
656 }
657 });
658
659 jQuery(document).on("click",".save_view_dashboard" , function(event){
660 if ( $( '#mysticky-stickymenu-form-enabled' ).prop( 'checked' ) == false && $('#save_stickymenu').val() == "" ) {
661 event.preventDefault();
662 $("#mysticky-sticky-save-confirm").show();
663 $("#stickymenu-option-overlay-popup").show();
664
665 $('#stickymenu_status_ok').attr('data-clickfrom', 'dashboard');
666 $('#stickymenu_status_dolater').attr('data-clickfrom', 'dashboard');
667 }
668 });
669
670 jQuery(document).on("click","#stickymenu_status_ok",function(){
671 var clickFrom = $(this).data("clickfrom");
672 $('#save_stickymenu').val("1");
673 $( '#mysticky-stickymenu-form-enabled' ).prop( 'checked' , true )
674 $("#mysticky-sticky-save-confirm").hide();
675 $("#stickymenu-option-overlay-popup").hide();
676 if(clickFrom == 'dashboard'){
677 $('.save_view_dashboard').trigger("click");
678 }else{
679 $('.btn-save-stickymenu').trigger("click");
680 }
681 });
682
683 jQuery(document).on("click","#stickymenu_status_dolater",function(){
684 var clickFrom = $(this).data("clickfrom");
685 $('#save_stickymenu').val("1");
686 if(clickFrom == 'dashboard'){
687 $('.save_view_dashboard').trigger("click");
688 }else{
689 $('.btn-save-stickymenu').trigger("click");
690 }
691 });
692
693 jQuery(document).on( 'click','.welcombar_save', function(e){
694
695 if ( $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_enable]"]' ).prop( 'checked' ) == false && $( 'input#save_welcome_bar' ).val() == '' ) {
696 e.preventDefault();
697 $("#welcomebar-save-confirm").show();
698 $("#welcombar-sbmtvalidation-overlay-popup").show();
699 $("#welcombar_sbmtbtn_off").attr("data-clickfrom",'save_button');
700 $("#welcomebar_yes_sbmtbtn").attr("data-clickfrom",'save_button');
701 }
702 });
703
704
705 jQuery(document).on( 'click','.save_view_dashboard', function(e){
706
707 if ( $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_enable]"]' ).prop( 'checked' ) == false && $( 'input#save_welcome_bar' ).val() == '' ) {
708 e.preventDefault();
709 $("#welcomebar-save-confirm").show();
710 $("#welcombar-sbmtvalidation-overlay-popup").show();
711 $("#welcombar_sbmtbtn_off").attr("data-clickfrom",'save_dashboard_button');
712 $("#welcomebar_yes_sbmtbtn").attr("data-clickfrom",'save_dashboard_button');
713 }
714 });
715 $( document ).on( 'change', '#mysticky-welcomebar-contact-form-enabled', function(){
716 $("span.mystickybar-visible, span.mystickybar-hidden").hide();
717 if( $(this).prop('checked') == true ) {
718 $("span.mystickybar-visible").show();
719 } else {
720 $("span.mystickybar-hidden").show();
721 }
722 })
723
724 jQuery(document).on("click","#welcomebar_yes_sbmtbtn",function(){
725
726 var clickFrom = $(this).data("clickfrom");
727
728 $("#welcomebar-save-confirm").hide();
729 $("#welcombar-sbmtvalidation-overlay-popup").hide();
730 $( 'input#welcome_save_anyway' ).val('1');
731 $( 'input#save_welcome_bar' ).val('1');
732 $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_enable]"]' ).prop( 'checked',true );
733 if(clickFrom == 'save_dashboard_button'){
734 $( '.mysticky-welcomebar-submit input.save_view_dashboard' ).trigger('click');
735 }else{
736 $( '.mysticky-welcomebar-submit input.welcombar_save' ).trigger('click');
737 }
738 });
739
740 jQuery(document).on("click","#welcombar_sbmtbtn_off",function(){
741 var clickFrom = $(this).data("clickfrom");
742
743 $("#welcomebar-save-confirm").hide();
744 $("#welcombar-sbmtvalidation-overlay-popup").hide();
745 $( 'input#welcome_save_anyway' ).val('1');
746 $( 'input#save_welcome_bar' ).val('1');
747
748 if(clickFrom == 'save_dashboard_button'){
749 $( '.mysticky-welcomebar-submit input.save_view_dashboard' ).trigger('click');
750 }else{
751 $( '.mysticky-welcomebar-submit input.welcombar_save' ).trigger('click');
752 }
753 });
754
755 jQuery(document).on("click","#mysticky-welcomebar-showcoupon-enabled",function(){
756 var url = jQuery(this).data("url");
757 jQuery(this).prop('checked',false);
758 window.open(url, '_blank');
759 });
760
761 jQuery(document).on("change","#mysticky-welcomebar-collectlead-enabled",function(){
762
763 var button_text = $(this).data("button-text");
764
765 if( $(this).prop("checked") == true ){
766
767 $(".timer-message").show();
768 $(".mysticky-welcomebar-collect-lead").show();
769 $(".welcomebar_height_content").hide();
770 $(".mysticky-welcomebar-preview-screen .mysticky-welcomebar-fixed .mysticky-welcomebar-content").css("width","90%");
771 $(".mysticky-welcomebar-lead-content").show();
772 $(".mysticky-welcomebar-btn a").text("Send me");
773 $("#mysticky_welcomebar_btn_text").val("Send me");
774 $(".mysticky-welcomebar-btn").addClass("collect-lead");
775 $(".height-setting").hide();
776 }else{
777
778 button_text = ( button_text == 'Send me' ) ? 'Got it!' : button_text;
779 $(".timer-message").hide();
780 $(".welcomebar_height_content").show();
781 $(".mysticky-welcomebar-collect-lead").hide();
782 $(".mysticky-welcomebar-preview-screen .mysticky-welcomebar-fixed .mysticky-welcomebar-content").css("width","75%");
783 $(".mysticky-welcomebar-lead-content").hide();
784 $(".mysticky-welcomebar-btn a").text(button_text);
785 $("#mysticky_welcomebar_btn_text").val(button_text);
786 $(".height-setting").show();
787 $(".mysticky-welcomebar-btn").removeClass("collect-lead");
788 }
789 });
790
791 jQuery(document).on("click","#send_lead_email_enable",function(){
792 var url = jQuery(this).data("url");
793 jQuery(this).prop('checked',false);
794 window.open(url, '_blank');
795 });
796
797
798 jQuery(document).on("keyup","#lead-name-placeholder,#lead-email-placeholder,#lead-phone-placeholder",function(e){
799 if( $(this).attr("id") == "lead-name-placeholder" ){
800 $(".preview-lead-name").attr("placeholder",$(this).val());
801 }else if( $(this).attr("id") == "lead-email-placeholder" ){
802 $(".preview-lead-email").attr("placeholder",$(this).val());
803 }else{
804 $(".preview-lead-phone").attr("placeholder",$(this).val());
805 }
806 });
807 /* Welcomebar Text*/
808 jQuery(document).on("change","input[name='mysticky_option_welcomebar[mysticky_welcomebar_text_type]']",function(){
809 if( $(this).val() == 'static_text' ){
810 $("#mysticky_welcomebar_static_text_setting").show();
811 $("#mysticky_welcomebar_sliding_text_setting").hide();
812 $("#mysticky_welcomebar_sliding_text_transition_style,#mysticky_welcomebar_sliding_text_transition_speed").hide();
813 }else{
814 $("#mysticky_welcomebar_static_text_setting").hide();
815 $("#mysticky_welcomebar_sliding_text_setting").show();
816 $("#mysticky_welcomebar_sliding_text_transition_style,#mysticky_welcomebar_sliding_text_transition_speed").show();
817 }
818
819 });
820
821 jQuery(document).on("change","input[name='mysticky_option_welcomebar[mysticky_welcomebar_lead_input]']",function(){
822 if( $(this).val() == 'email_address' ){
823 $("#lead-email-content").show();
824 $("#lead-phone-content").hide();
825 $(".preview-lead-email").show();
826 $(".preview-lead-phone").hide();
827 }else{
828 $("#lead-email-content").hide();
829 $("#lead-phone-content").show();
830 $(".preview-lead-email").hide();
831 $(".preview-lead-phone").show();
832 }
833
834 });
835
836 /* Mystickymenu : Single delete contact lead data - Contact lead page */
837
838 jQuery(document).on("click",".mystickymenu-delete-entry",function(event){
839
840 var deleterowid = $( this ).attr( "data-delete" );
841 var confirm_delete = window.confirm("Are you sure you want to delete Record with ID# "+deleterowid);
842 if (confirm_delete == true) {
843 jQuery.ajax({
844 type: 'POST',
845 url: ajaxurl,
846 data: {"action": "mystickymenu_delete_contact_lead","ID": deleterowid, delete_nonce: jQuery("#delete_nonce").val(),"wpnonce": mystickymenu.ajax_nonce},
847 success: function(data){
848 location.href = window.location.href;
849 },
850 error: function(XMLHttpRequest, textStatus, errorThrown) {
851 alert("Status: " + textStatus); alert("Error: " + errorThrown);
852 }
853 });
854 }
855
856 });
857
858 /* Mystickymenu : Bulk delete all contact lead data - Contact lead page */
859
860 jQuery(document).on("click","#mystickymenu_delete_all_leads", function(){
861 var confirm_delete = window.confirm("Are you sure you want to delete all Record from the database?");
862 if (confirm_delete == true) {
863 jQuery.ajax({
864 type: 'POST',
865 url: ajaxurl,
866 data: {"action": "mystickymenu_delete_contact_lead", 'all_leads': 1 , delete_nonce: jQuery("#delete_nonce").val(),"wpnonce": mystickymenu.ajax_nonce},
867 success: function(data){
868 location.href = window.location.href;
869 },
870 error: function(XMLHttpRequest, textStatus, errorThrown) {
871 alert("Status: " + textStatus); alert("Error: " + errorThrown);
872 }
873 });
874 }
875 return false;
876 });
877
878 /* Mystickymenu : Bulk do action trigger in contact lead table */
879
880 jQuery(document).on('click','#doaction',function(e){
881 e.preventDefault();
882 var bulks = [];
883 jQuery( '.cb-select-blk' ).each( function(){
884 if (this.checked) {
885 bulks.push( jQuery(this).val() );
886 }
887 } );
888
889 jQuery.ajax({
890 type: 'POST',
891 url: ajaxurl,
892 data: {"action": "my_sticky_menu_bulks","bulks": bulks,"wpnonce": mystickymenu.ajax_nonce},
893 success: function(data){
894 location.href = window.location.href;
895 },
896 error: function(XMLHttpRequest, textStatus, errorThrown) {
897 alert("Status: " + textStatus); alert("Error: " + errorThrown);
898 }
899 });
900 } );
901
902 jQuery(document).on( 'change','#mysticky-welcomebar-close-automatically-enabled', function(){
903 $(this).prop("checked",false);
904 var url = $(this).data("url");
905 window.open(url, '_blank');
906 });
907
908 jQuery(document).on("click",".save_change",function(){
909 $( '.mysticky-welcomebar-submit input.welcombar_save' ).trigger('click');
910 });
911
912 jQuery(document).on( 'change','#mysticky_welcomebar_show_success_message', function(){
913 if( $( this ).prop( "checked" ) == true ) {
914 $('#mysticky-welcomebar-thankyou-wrap').show();
915 } else {
916 $('#mysticky-welcomebar-thankyou-wrap').hide();
917 }
918 });
919
920 //rating popup
921 $(document).on("keyup", "#upgrade-review-comment", function(){
922 var commentLength = 1000 - parseInt($.trim($(this).val()).length);
923 if(commentLength < 0) {
924 var userComment = $.trim($(this).val());
925 userComment = userComment.slice(0, 1000);
926 $(".upgrade-review-textarea label span").text(0);
927 $(this).val(userComment);
928 } else {
929 $(".upgrade-review-textarea label span").text(commentLength);
930 }
931 });
932
933 $(document).on("change", "#upgrade-review-comment", function(){
934 var commentLength = 1000 - parseInt($.trim($(this).val()).length);
935 if(commentLength < 0) {
936 var userComment = $.trim($(this).val());
937 userComment = userComment.slice(0, 1000);
938 $(".upgrade-review-textarea label span").text(0);
939 $(this).val(userComment);
940 } else {
941 $(".upgrade-review-textarea label span").text(commentLength);
942 }
943 });
944
945 $(document).ready(
946 function () {
947 if( $("#mystickymenu-rating").length != 0 ) {
948 $("#rating-modal-popup").show();
949 $("#mystickymenu-rating").starRating({
950 initialRating : 0,
951 useFullStars : true,
952 strokeColor : '#FDB10C',
953 ratedColor : '#FDB10C',
954 activeColor : '#FDB10C',
955 strokeWidth : 0,
956 minRating : 1,
957 starSize : 32,
958 useGradient : 0,
959 onHover: function(currentRate) {
960 $(".upgrade-user-rating span").text(currentRate+"/5");
961 $(".upgrade-user-rating" ).css('visibility', 'visible');
962 },
963 onLeave: function(currentRate) {
964 $(".upgrade-user-rating" ).css('visibility', 'hidden');
965 },
966 callback( currentRate ) {
967 console.log(currentRate);
968 if( currentRate !== 5 ) {
969 $(".rating-modal-steps").removeClass("active");
970 $(".rating-modal-steps#step-2").addClass("active");
971 $("#mystickymenu-rated-rating").html("");
972 for(let i=0 ; i< parseInt(currentRate); i++) {
973 var ratingStar = '<div class="jq-star"><svg shape-rendering="geometricPrecision" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="305px" height="305px" viewBox="60 -62 309 309" style="enable-background:new 64 -59 305 305; stroke-width:0px;" xml:space="preserve"> <polygon data-side="center" className="svg-empty-28" points="281.1,129.8 364,55.7 255.5,46.8 214,-59 172.5,46.8 64,55.4 146.8,129.7 121.1,241 212.9,181.1 213.9,181 306.5,241 " style="fill: transparent; stroke: #ffa83e;"></polygon> <polygon data-side="left" className="svg-empty-28" points="281.1,129.8 364,55.7 255.5,46.8 214,-59 172.5,46.8 64,55.4 146.8,129.7 121.1,241 213.9,181.1 213.9,181 306.5,241 " style="stroke-opacity: 0;"></polygon> <polygon data-side="right" className="svg-empty-28" points="364,55.7 255.5,46.8 214,-59 213.9,181 306.5,241 281.1,129.8 " style="stroke-opacity: 0;"></polygon> </svg></div>';
974 $("#mystickymenu-rated-rating").append(ratingStar);
975 }
976 } else {
977 window.open("https://wordpress.org/support/plugin/mystickymenu/reviews/#new-post", '_blank');
978 set_mystickymenu_review_reminder(-1);
979 }
980 }
981 })
982 }
983
984 $(document).on("click", ".close-popup-button a.hide-upgrade-modal", function(){
985 if($(".rating-modal-steps#step-3").hasClass("active")) {
986 set_mystickymenu_review_reminder(14);
987 } else {
988 $(".rating-modal-steps").removeClass("active");
989 $(".rating-modal-steps#step-3").addClass("active");
990 }
991 });
992
993 $(document).on("click", "#upgrade-review-button", function(){
994 $("#rating-modal-popup").hide();
995 var review_reminder = ($('.upgrade-review-reminder').length >= 1) ? $('.upgrade-review-reminder').val(): "-1";
996 jQuery.ajax({
997 type:'post',
998 url: mystickymenu.ajaxurl,
999 data: {
1000 action: "mystickymenu_review_box_message",
1001 rating: $("#mystickymenu-rated-rating .jq-star").length,
1002 nonce: mystickymenu.ajax_nonce,
1003 message: $.trim($("#upgrade-review-comment").val())
1004 },
1005 success: function() {
1006 set_mystickymenu_review_reminder(review_reminder);
1007 }
1008 });
1009 });
1010
1011
1012 function set_mystickymenu_review_reminder(noOfDays) {
1013 $.ajax({
1014 type: "post",
1015 url: mystickymenu.ajaxurl,
1016 data: {
1017 action: "mystickymenu_review_box",
1018 days: noOfDays,
1019 nonce: mystickymenu.ajax_nonce
1020 },
1021
1022 success: function() {
1023
1024 }
1025 });
1026 $("#rating-modal-popup").remove();
1027 }
1028
1029 $(document).on("click", ".mystickymenu-popup-form", function( e ){
1030 if ( $(e.target).attr('id') == 'rating-modal-popup' ) {
1031 let step_id = $( '#rating-modal-popup .rating-modal-steps.active' ).attr( 'id') ;
1032
1033 if ( step_id == 'step-1' ) {
1034 $(".rating-modal-steps").removeClass("active");
1035 $(".rating-modal-steps#step-3").addClass("active");
1036 }
1037
1038 if ( step_id == 'step-3' ) {
1039 $('#upgrade-review-reminder option[value="14"]').attr("selected", "selected");
1040 $( "#upgrade-review-button" ).trigger( 'click');
1041 }
1042 }
1043
1044 });
1045
1046 });
1047
1048 })(jQuery);
1049