myStickymenu - Version 2.4

Version Description

You can now change the sticky menu font color when the menu is sticky. We've also fixed a resize issue and a Divi gap bug

Download this release

Release Info

Developer galdub
Plugin Icon 128x128 myStickymenu
Version 2.4
Comparing to
See all releases

Code changes from version 2.3.9 to 2.4

css/mystickymenu-admin.css CHANGED
@@ -1275,13 +1275,13 @@ a.rpt_tooltip span.intool b {
1275
  border: none
1276
  }
1277
 
1278
- .folder-testimonial {
1279
  position: relative;
1280
  }
1281
- .folder-testimonial .testimonial-data {
1282
  position: relative;
1283
  }
1284
- .folder-testimonial .testimonial-data {
1285
  position: relative;
1286
  margin-left: 30px;
1287
  padding: 10px 10px 10px 40px;
@@ -1289,7 +1289,7 @@ a.rpt_tooltip span.intool b {
1289
  font-size: 16px;
1290
  line-height: 22px;
1291
  }
1292
- .folder-testimonial .testimonial-image {
1293
  position: absolute;
1294
  height: 60px;
1295
  width: 60px;
@@ -1299,11 +1299,11 @@ a.rpt_tooltip span.intool b {
1299
  margin-top: -30px;
1300
  z-index: 1;
1301
  }
1302
- .folder-testimonial .testimonial-image img {
1303
  width: 100%;
1304
  height: auto;
1305
  }
1306
- .folder-testimonial-list {
1307
  width: 100%;
1308
  max-width: 1080px;
1309
  margin: 30px auto;
@@ -1682,7 +1682,7 @@ a.create-rule {
1682
  .mysticky-welcomebar-page-option .url-content > div {
1683
  padding: 0 5px;
1684
  float: left;
1685
-
1686
  }
1687
 
1688
  .mysticky-welcomebar-page-option .url-content .mysticky-welcomebar-url-values,
@@ -1692,11 +1692,11 @@ a.create-rule {
1692
  .mysticky-welcomebar-page-option .url-content > div.mysticky-welcomebar-url-box {
1693
  width: 28%;
1694
  text-align: right;
1695
- margin-top: 10px;
1696
  }
1697
 
1698
  /*.mysticky-welcomebar-page-option .url-content select {
1699
- width: 120px;
1700
  }
1701
  */
1702
  .mysticky-welcomebar-page-option .url-content input[type="text"] {
@@ -1906,15 +1906,15 @@ a.create-rule {
1906
  -webkit-animation: fa-spin 0.75s infinite linear;
1907
  animation: fa-spin 0.75s infinite linear;
1908
  }
1909
- .add-update-folder-title {
1910
  font-size: 20px;
1911
  line-height: 30px;
1912
  padding: 20px 20px 0;
1913
  }
1914
- .folder-form-input {
1915
  padding: 10px 20px;
1916
  }
1917
- .folder-form-input input {
1918
  width: 100%;
1919
  transition: border-color .3s,box-shadow .3s;
1920
  border: 1px solid #d9d9d9;
@@ -1933,6 +1933,82 @@ div#wp-mysticky_bar_text-wrap {
1933
  width: 40%;
1934
  }
1935
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1936
  @-webkit-keyframes fa-spin {
1937
  0% {
1938
  -webkit-transform: rotate(0deg);
1275
  border: none
1276
  }
1277
 
1278
+ .mystickymenu-testimonial {
1279
  position: relative;
1280
  }
1281
+ .mystickymenu-testimonial .testimonial-data {
1282
  position: relative;
1283
  }
1284
+ .mystickymenu-testimonial .testimonial-data {
1285
  position: relative;
1286
  margin-left: 30px;
1287
  padding: 10px 10px 10px 40px;
1289
  font-size: 16px;
1290
  line-height: 22px;
1291
  }
1292
+ .mystickymenu-testimonial .testimonial-image {
1293
  position: absolute;
1294
  height: 60px;
1295
  width: 60px;
1299
  margin-top: -30px;
1300
  z-index: 1;
1301
  }
1302
+ .mystickymenu-testimonial .testimonial-image img {
1303
  width: 100%;
1304
  height: auto;
1305
  }
1306
+ .mystickymenu-testimonial-list {
1307
  width: 100%;
1308
  max-width: 1080px;
1309
  margin: 30px auto;
1682
  .mysticky-welcomebar-page-option .url-content > div {
1683
  padding: 0 5px;
1684
  float: left;
1685
+
1686
  }
1687
 
1688
  .mysticky-welcomebar-page-option .url-content .mysticky-welcomebar-url-values,
1692
  .mysticky-welcomebar-page-option .url-content > div.mysticky-welcomebar-url-box {
1693
  width: 28%;
1694
  text-align: right;
1695
+ margin-top: 10px;
1696
  }
1697
 
1698
  /*.mysticky-welcomebar-page-option .url-content select {
1699
+ width: 120px;
1700
  }
1701
  */
1702
  .mysticky-welcomebar-page-option .url-content input[type="text"] {
1906
  -webkit-animation: fa-spin 0.75s infinite linear;
1907
  animation: fa-spin 0.75s infinite linear;
1908
  }
1909
+ .add-update-mystickymenu-title {
1910
  font-size: 20px;
1911
  line-height: 30px;
1912
  padding: 20px 20px 0;
1913
  }
1914
+ .mystickymenu-form-input {
1915
  padding: 10px 20px;
1916
  }
1917
+ .mystickymenu-form-input input {
1918
  width: 100%;
1919
  transition: border-color .3s,box-shadow .3s;
1920
  border: 1px solid #d9d9d9;
1933
  width: 40%;
1934
  }
1935
 
1936
+ .mystickymenu-popup {
1937
+ position: fixed;
1938
+ width: 100%;
1939
+ height: 100%;
1940
+ top: 0;
1941
+ left: 0;
1942
+ z-index: 100001;
1943
+ background: rgba(0, 0, 0, .75)
1944
+ }
1945
+
1946
+ .mystickymenu-popup-box {
1947
+ padding: 0;
1948
+ width: 600px;
1949
+ max-width: 100%;
1950
+ margin: auto;
1951
+ top: 50%;
1952
+ position: absolute;
1953
+ left: 0;
1954
+ right: 0;
1955
+ border-radius: 5px;
1956
+ transform: translate(0, -50%);
1957
+ -webkit-transform: translate(0, -50%);
1958
+ -moz-transform: translate(0, -50%);
1959
+ text-align: center;
1960
+ background: #fcfcfc
1961
+ }
1962
+
1963
+ .mystickymenu-popup-header {
1964
+ padding: 15px;
1965
+ font-size: 20px;
1966
+ border-bottom: solid 1px #e6e6e6
1967
+ }
1968
+
1969
+ .mystickymenu-popup-content {
1970
+ background: #fff;
1971
+ padding: 15px;
1972
+ font-size: 14px;
1973
+ line-height: 20px
1974
+ }
1975
+
1976
+ .mystickymenu-popup-content iframe {
1977
+ margin: 30px 0
1978
+ }
1979
+
1980
+ .mystickymenu-popup-footer {
1981
+ padding: 15px;
1982
+ border-top: solid 1px #e6e6e6
1983
+ }
1984
+
1985
+ .mystickymenu-popup-footer button {
1986
+ border: none;
1987
+ padding: 10px 20px;
1988
+ border-radius: 4px;
1989
+ background: #00c478;
1990
+ color: #fff;
1991
+ cursor: pointer;
1992
+ }
1993
+
1994
+ .close-mystickymenu-popup {
1995
+ margin: 0;
1996
+ padding: 0;
1997
+ background: 0 0;
1998
+ border: none;
1999
+ float: right;
2000
+ background: #000;
2001
+ border-radius: 50%;
2002
+ color: #fff;
2003
+ text-align: center;
2004
+ width: 24px;
2005
+ height: 24px;
2006
+ cursor: pointer;
2007
+ }
2008
+
2009
+ .close-mystickymenu-popup span {
2010
+ line-height: 24px
2011
+ }
2012
  @-webkit-keyframes fa-spin {
2013
  0% {
2014
  -webkit-transform: rotate(0deg);
js/mystickymenu.js CHANGED
@@ -1,445 +1 @@
1
- /*!
2
- * myStickymenu by m.r.d.a
3
- * v2.0.4
4
- */
5
-
6
- (function( $ ) {
7
- "use strict";
8
-
9
- $(document).ready(function($){
10
-
11
- if ( jQuery.browser.mobile && !option.device_mobile) {
12
- return false;
13
- } else if ( !jQuery.browser.mobile && !option.device_desktop) {
14
- return false;
15
- }
16
-
17
- // get Sticky Class setting if class name existts
18
- if ($(option.mystickyClass) [0]){
19
- // Do nothing
20
- } else {
21
- // Do something if class does not exist and stop
22
- console.log("myStickymenu: Entered Sticky Class does not exist, change it in Dashboard / Settings / myStickymenu / Sticky Class. ");
23
- return;
24
- }
25
-
26
-
27
- // Get class name
28
- var mystickyClass = document.querySelector(option.mystickyClass);
29
-
30
- // get disable at small screen size setting
31
- var disableWidth = parseInt(option.disableWidth);
32
-
33
- // get disable at large screen size setting
34
- var disableLargeWidth = parseInt(option.disableLargeWidth);
35
-
36
- // get transition effect (slide or fade)
37
- var mystickyTransition = option.mystickyTransition;
38
-
39
- // get activaton height setting
40
- var activationHeight = parseInt(option.activationHeight);
41
-
42
- // if is admin bar showing, needed for auto calc of activation height when admin bar is showing
43
- var adminBar = option.adminBar;
44
-
45
- // disable on scroll down
46
- var mysticky_disable_down = option.mysticky_disable_down;
47
-
48
- var viewportWidth;
49
-
50
- function calcViewportWidth(e){
51
-
52
- // Calculate actual viewport width
53
- var e = window, a = 'inner';
54
-
55
- if (!('innerWidth' in window )) {
56
- a = 'client';
57
- e = document.documentElement || document.body;
58
- }
59
- viewportWidth = e[ a+'Width' ];
60
-
61
- }
62
-
63
- calcViewportWidth();
64
-
65
- var parentmysticky = mystickyClass.parentNode;
66
-
67
- var wrappermysticky = document.createElement('div');
68
- var position = 0;
69
- for(var i = 0; i < parentmysticky.childNodes.length; i++) {
70
- if(parentmysticky.childNodes[i] == mystickyClass) {
71
- position = i;
72
- break;
73
- }
74
- }
75
-
76
- wrappermysticky.id = 'mysticky-wrap';
77
- wrappermysticky.appendChild(mystickyClass);
78
- parentmysticky.insertBefore(wrappermysticky, parentmysticky.childNodes[position]);
79
-
80
- var parentnav = mystickyClass.parentNode;
81
- var wrappernav = document.createElement('div');
82
- wrappernav.id = 'mysticky-nav';
83
- parentnav.replaceChild(wrappernav, mystickyClass);
84
- wrappernav.appendChild(mystickyClass);
85
-
86
- // get activation height from settings
87
- if ( activationHeight == "0" ) {
88
- var autoActivate = true;
89
- }
90
-
91
- var mydivHeight;
92
-
93
-
94
- function initialDivHeight(){
95
-
96
- // get initial element height of selected sticky class
97
- mydivHeight = (mystickyClass.offsetHeight);
98
-
99
- // when initial element have margin bottom - awaken example using #masthead class
100
- if (parseInt($(mystickyClass).css("marginBottom")) > 0) {
101
-
102
- // element have margin bottom, apply it to initial wrap
103
- //$(mystickyClass).css("marginBottom").replace('px', '')
104
- wrappermysticky.style.marginBottom = ($(mystickyClass).css("marginBottom"));
105
- }
106
-
107
- if (mydivHeight == "0") {
108
- // something is wrong, wrapper cant be zero, if so content will jump while scroll. Awaken theme (for example) with .awaken-navigation-container class selected will use this part. Calculate height based on element children height
109
-
110
- $(mystickyClass).children().filter(':visible').each(function(){
111
- mydivHeight = $(this).outerHeight(true);
112
-
113
- });
114
-
115
- }
116
-
117
- if (viewportWidth >= disableWidth) {
118
- //wrappermysticky.style.height = mydivHeight + 'px';
119
- }
120
- }
121
-
122
- initialDivHeight();
123
-
124
- var myfixedHeight;
125
-
126
- function fixedDivHeight(){
127
- //if ( autoActivate == true ) {
128
-
129
- // calculate element height while fixed
130
- mystickyClass.classList.add('myfixed')
131
-
132
- myfixedHeight = $(".myfixed").outerHeight();
133
-
134
- if (myfixedHeight == "0") {
135
- // something is wrong, wrapper cant be zero, try to calculate again with div children.
136
- $(".myfixed").children().filter(':visible').each(function(){
137
- myfixedHeight = $(this).outerHeight(true);
138
- });
139
- }
140
-
141
- mystickyClass.classList.remove('myfixed');
142
-
143
- //}
144
-
145
- }
146
-
147
- fixedDivHeight();
148
-
149
- var adminBarHeight = 0;
150
-
151
- function calcAdminBarHeight(){
152
-
153
- if ((adminBar == "true" ) && (viewportWidth > 600)) {
154
-
155
- if ($("#wpadminbar")[0]){
156
- adminBarHeight = $('#wpadminbar').height();
157
- } else {
158
- adminBarHeight = 0;
159
- }
160
- } else {
161
- adminBarHeight = 0;
162
- }
163
-
164
-
165
- //wrappernav.style.top = adminBarHeight + "px";
166
- if (mystickyTransition == "slide") {
167
- wrappernav.style.top = "-" + myfixedHeight + "px";
168
- //wrappernav.style.top = "-" + myfixedHeight + "px";
169
- } else {
170
- wrappernav.style.top = adminBarHeight + "px";
171
- }
172
-
173
- }
174
-
175
- calcAdminBarHeight();
176
-
177
-
178
- var mydivWidth;
179
-
180
- function initialDivWidth(){
181
-
182
- var rect = $(mystickyClass)[0].getBoundingClientRect();
183
- mydivWidth = rect.width;
184
-
185
- //var mydivWidth = ((mystickyClass.offsetWidth) + 'px');
186
- //mystickyClass.style.width = mydivWidth + "px";
187
-
188
- }
189
-
190
- initialDivWidth();
191
-
192
-
193
-
194
-
195
- var deactivationHeight = activationHeight;
196
-
197
- function calcActivationHeight() {
198
-
199
- // If activate height (Make visible on Scroll) is set to 0, automatic calculation will be used.
200
- if ( autoActivate == true ) {
201
-
202
- // Automatic calculation of activation and deactivation height (Make visible on Scroll is set to 0).
203
- if (mystickyTransition == "slide") {
204
- // Slide effect is selected
205
- //activationHeight = $(mystickyClass).offset().top + mystickyClass.offsetHeight - adminBarHeight;
206
- activationHeight = $(mystickyClass).offset().top + mydivHeight - adminBarHeight;
207
- deactivationHeight = $(mystickyClass).offset().top + mydivHeight - adminBarHeight;
208
- //deactivationHeight = $(mystickyClass).offset().top - adminBarHeight;
209
-
210
- if (mysticky_disable_down == "on") {
211
- deactivationHeight = $(mystickyClass).offset().top - adminBarHeight;
212
-
213
- }
214
-
215
- }
216
-
217
- if (mystickyTransition == "fade") {
218
-
219
- if (mysticky_disable_down == "false") {
220
- // Fade effect is selected
221
- activationHeight = $(mystickyClass).offset().top - adminBarHeight;
222
-
223
- deactivationHeight = $(mystickyClass).offset().top - adminBarHeight;
224
-
225
- }
226
-
227
- if (mysticky_disable_down == "on") {
228
-
229
- // Fade effect is selected
230
- activationHeight = $(mystickyClass).offset().top - adminBarHeight + mydivHeight;
231
- deactivationHeight = $(mystickyClass).offset().top - adminBarHeight;
232
-
233
- }
234
-
235
- }
236
-
237
- }
238
-
239
- }
240
-
241
- calcActivationHeight();
242
-
243
- function headerDeactivateOnHeight() {
244
-
245
-
246
- if ( autoActivate == true ) {
247
-
248
- if ( mydivHeight > myfixedHeight ){
249
- // Auto activate is true, Make visible on Scroll is set to 0, menu is probably header
250
-
251
-
252
-
253
- if (mystickyTransition == "slide") {
254
- // slide effect is selected
255
- deactivationHeight = activationHeight;
256
-
257
- if (mysticky_disable_down == "on") {
258
- deactivationHeight = activationHeight - myfixedHeight;
259
-
260
- }
261
-
262
-
263
- } else {
264
- activationHeight = mydivHeight;
265
- deactivationHeight = mydivHeight;
266
-
267
- }
268
-
269
- }
270
-
271
- }
272
-
273
- }
274
-
275
- headerDeactivateOnHeight();
276
-
277
-
278
- var hasScrollY = 'scrollY' in window;
279
- var lastScrollTop = 0;
280
-
281
- function onScroll(e) {
282
-
283
- //initialDivHeight();
284
- // if body width is larger than disable at small screen size setting
285
-
286
- if (viewportWidth >= disableWidth) {
287
-
288
- if ( disableLargeWidth == 0 || viewportWidth <= disableLargeWidth ) {
289
-
290
- //if (mysticky_disable_down == "on") {
291
-
292
- var y = hasScrollY ? window.scrollY : document.documentElement.scrollTop;
293
-
294
- //var yScrollPosition = $(this).scrollTop();
295
-
296
- // add up or down class to the element depending on scroll direction
297
- if (0 <= y ) {
298
-
299
- //var st = $(this).scrollTop();
300
-
301
- if (y >= lastScrollTop){
302
-
303
- // downscroll code
304
-
305
- // add myfixed and wrapfixed class to selected fixed element while scroll down
306
- y >= activationHeight ? mystickyClass.classList.add('myfixed') : "";
307
- y >= activationHeight ? wrappernav.classList.add('wrapfixed') : "";
308
-
309
- y >= activationHeight ? wrappermysticky.style.height = mydivHeight + 'px' : "";
310
- y >= activationHeight ? mystickyClass.style.width = mydivWidth + "px" : "";
311
-
312
-
313
- if (mystickyTransition == "slide") {
314
-
315
- if (mysticky_disable_down == "false") {
316
- //y < activationHeight + (myfixedHeight + 250) - adminBarHeight ? wrappernav.style.top = "-" + myfixedHeight + "px" : '';
317
- //wrappernav.style.top = "-" + myfixedHeight + "px"
318
- y >= activationHeight + myfixedHeight - adminBarHeight ? wrappernav.style.top = adminBarHeight + "px" : wrappernav.style.top = "-" + myfixedHeight + "px";
319
-
320
- }
321
-
322
- if ( mydivHeight > myfixedHeight ){
323
- // if it's header (guess)
324
-
325
- if (mysticky_disable_down == "false") {
326
-
327
- y < activationHeight + myfixedHeight ? wrappernav.style.top = "-" + mydivHeight + "px" : '';
328
- y >= activationHeight + myfixedHeight ? wrappernav.style.top = adminBarHeight + "px" : '';
329
-
330
- }
331
-
332
- }
333
-
334
- }
335
-
336
- wrappernav.classList.add('down');
337
- wrappernav.classList.remove('up');
338
-
339
-
340
- if (mysticky_disable_down == "on") {
341
- wrappernav.style.top = "-" + (mydivHeight + adminBarHeight ) + "px";
342
- jQuery('#mysticky-nav ' + option.mystickyClass+'.elementor-sticky').hide();
343
- //jQuery('#mysticky-nav ' + option.mystickyClass).css( 'top' , "-" + (mydivHeight + adminBarHeight ) + "px");
344
- }
345
-
346
- } else {
347
- // upscroll code
348
-
349
- var x = hasScrollY ? window.scrollY : document.documentElement.scrollTop;
350
- //x > deactivationHeight ? '' : mystickyClass.classList.remove('myfixed') ;
351
- //x > deactivationHeight ? '' : wrappernav.classList.remove('wrapfixed');
352
-
353
- x > deactivationHeight ? "" : wrappermysticky.style.height = "";
354
- x > deactivationHeight ? "" : mystickyClass.style.width = "";
355
-
356
- if (mystickyTransition == "slide") {
357
-
358
- x > deactivationHeight ? '' : mystickyClass.classList.remove('myfixed') ;
359
- x > deactivationHeight ? '' : wrappernav.classList.remove('wrapfixed');
360
-
361
- if (mysticky_disable_down == "false") {
362
-
363
- x < deactivationHeight + myfixedHeight + 200 - adminBarHeight ? wrappernav.style.top = "-" + myfixedHeight + "px" : '';
364
- }
365
-
366
- } else {
367
-
368
- x > deactivationHeight ? "" : mystickyClass.classList.remove('myfixed') ;
369
- x > deactivationHeight ? "" : wrappernav.classList.remove('wrapfixed');
370
-
371
- }
372
-
373
-
374
- wrappernav.classList.remove('down');
375
- wrappernav.classList.add('up');
376
-
377
- if (mysticky_disable_down == "on") {
378
- wrappernav.style.top = adminBarHeight + "px";
379
- jQuery('#mysticky-nav '+ option.mystickyClass).css( 'width' , mydivWidth + "px");
380
- jQuery('#mysticky-nav ' + option.mystickyClass+'.elementor-sticky').show();
381
-
382
- }
383
-
384
- }
385
-
386
- lastScrollTop = y;
387
-
388
- } else {
389
- //if (mysticky_disable_down == "on") {
390
- wrappernav.classList.remove('up');
391
- //}
392
- }
393
-
394
- } // if disableWidth is greater than zero
395
-
396
-
397
- } // if disableLargeWidth is 0 or greater than zero
398
-
399
- }
400
-
401
- document.addEventListener('scroll', onScroll);
402
-
403
-
404
- var width = $(window).width()
405
-
406
- function OnResizeDocument () {
407
-
408
- // don't recalculate on height change, only width
409
- if($(window).width() != width ){
410
-
411
- wrappernav.classList.remove('up');
412
- wrappernav.classList.remove('down');
413
-
414
- if ($(".wrapfixed")[0]){
415
- // If class wrapfixed exists
416
- // Remove myfixed and wrapfixed clases so we can calculate
417
- mystickyClass.classList.remove('myfixed');
418
- wrappernav.classList.remove('wrapfixed');
419
-
420
- } else {
421
- // Else class wrapfixed does not exists
422
- initialDivHeight();
423
-
424
- // Remove width
425
- mystickyClass.style.removeProperty("width");
426
- initialDivWidth();
427
-
428
- }
429
- calcViewportWidth();
430
- calcAdminBarHeight();
431
- fixedDivHeight();
432
- calcActivationHeight();
433
- headerDeactivateOnHeight();
434
-
435
- }
436
-
437
- }
438
-
439
- window.addEventListener('resize', OnResizeDocument);
440
- // need to test this, it should fire script on mobile orientation change, since onresize is somehow faulty in this case
441
- window.addEventListener('orientationchange', OnResizeDocument);
442
-
443
- });
444
-
445
- })(jQuery);
1
+ !function(e){"use strict";jQuery(document).ready(function(e){if(jQuery.browser.mobile&&!option.device_mobile)return!1;if(!jQuery.browser.mobile&&!option.device_desktop)return!1;if(e(option.mystickyClass)[0]){var t,i=document.querySelector(option.mystickyClass),o=parseInt(option.disableWidth),s=parseInt(option.disableLargeWidth),n=option.mystickyTransition,d=parseInt(option.activationHeight),a=option.adminBar,r=option.mysticky_disable_down;C();for(var l=i.parentNode,c=document.createElement("div"),m=0,p=0;p<l.childNodes.length;p++)if(l.childNodes[p]==i){m=p;break}c.id="mysticky-wrap",c.appendChild(i),l.insertBefore(c,l.childNodes[m]);var y,f,u=i.parentNode,w=document.createElement("div");if(w.id="mysticky-nav",u.replaceChild(w,i),w.appendChild(i),"0"==d)var h=!0;E(),j();var v,x=0;B(),Q();var k=d;S(),H();var g="scrollY"in window,L=0;document.addEventListener("scroll",function(a){var l=e(".mysticky-welcomebar-fixed").css("top"),m=e(".mysticky-welcomebar-fixed").data("position"),p=e(".mysticky-welcomebar-fixed").data("height");if(e(".mysticky-welcomebar-fixed").length&&parseInt(l)>=0&&"top"==m)var u=p;else u="";if(t>=o&&(0==s||t<=s)){var h=g?window.scrollY:document.documentElement.scrollTop;if(0==document.documentElement.scrollTop&&w.classList.remove("wrapfixed"),0<=h){if(h>=L)h>=d&&i.classList.add("myfixed"),h>=d&&w.classList.add("wrapfixed"),h>=d&&(c.style.height=y+"px"),h>=d&&(i.style.width=v+"px"),"slide"==n&&("false"==r&&(w.style.top=h>=d+f-x?x+u+"px":"-"+f+"px"),y>f&&"false"==r&&(h<d+f&&(w.style.top="-"+y+"px"),h>=d+f&&(w.style.top=x+u+"px"))),w.classList.add("down"),w.classList.remove("up"),"on"==r&&(w.style.top="-"+(y+x)+"px",jQuery("#mysticky-nav "+option.mystickyClass+".elementor-sticky").hide());else{var b=g?window.scrollY:document.documentElement.scrollTop;!(b>k)&&(c.style.height=""),!(b>k)&&(i.style.width=""),"slide"==n?(!(b>k)&&i.classList.remove("myfixed"),!(b>k)&&w.classList.remove("wrapfixed"),"false"==r&&b<k+f+200-x&&(w.style.top="-"+f+"px")):(!(b>k)&&i.classList.remove("myfixed"),!(b>k)&&w.classList.remove("wrapfixed")),w.classList.remove("down"),w.classList.add("up"),"on"==r&&(w.style.top=x+u+"px",jQuery("#mysticky-nav "+option.mystickyClass).css("width",v+"px"),jQuery("#mysticky-nav "+option.mystickyClass+".elementor-sticky").show())}L=h}else w.classList.remove("up")}});var b=e(window).width();window.addEventListener("resize",I),window.addEventListener("orientationchange",I)}else console.log("myStickymenu: Entered Sticky Class does not exist, change it in Dashboard / Settings / myStickymenu / Sticky Class. ");function C(e){e=window;var i="inner";"innerWidth"in window||(i="client",e=document.documentElement||document.body),t=e[i+"Width"]}function E(){y=i.offsetHeight,parseInt(e(i).css("marginBottom"))>0&&(c.style.marginBottom=e(i).css("marginBottom")),"0"==y&&e(i).children().filter(":visible").each(function(){y=e(this).outerHeight(!0)})}function j(){i.classList.add("myfixed"),"0"==(f=e(".myfixed").outerHeight())&&e(".myfixed").children().filter(":visible").each(function(){f=e(this).outerHeight(!0)}),i.classList.remove("myfixed")}function B(){x="true"==a&&t>600&&e("#wpadminbar")[0]?e("#wpadminbar").height():0,w.style.top="slide"==n?"-"+f+"px":x+"px"}function Q(){var t=e(i)[0].getBoundingClientRect();v=t.width}function S(){1==h&&("slide"==n&&(d=e(i).offset().top+y-x,k=e(i).offset().top+y-x,"on"==r&&(k=e(i).offset().top-x)),"fade"==n&&("false"==r&&(d=e(i).offset().top-x,k=e(i).offset().top-x),"on"==r&&(d=e(i).offset().top-x+y,k=e(i).offset().top-x)))}function H(){1==h&&y>f&&("slide"==n?(k=d,"on"==r&&(k=d-f)):(d=y,k=y))}function I(){e(window).width()!=b&&(w.classList.remove("up"),w.classList.remove("down"),e(".wrapfixed")[0]||(E(),i.style.removeProperty("width"),Q()),C(),B(),j(),S(),H())}})}();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/mystickymenu.min.js CHANGED
@@ -1,28 +1 @@
1
- (function($){"use strict";$(document).ready(function($){if(jQuery.browser.mobile&&!option.device_mobile){return!1}else if(!jQuery.browser.mobile&&!option.device_desktop){return!1}
2
- if($(option.mystickyClass)[0]){}else{console.log("myStickymenu: Entered Sticky Class does not exist, change it in Dashboard / Settings / myStickymenu / Sticky Class. ");return}
3
- var mystickyClass=document.querySelector(option.mystickyClass);var disableWidth=parseInt(option.disableWidth);var disableLargeWidth=parseInt(option.disableLargeWidth);var mystickyTransition=option.mystickyTransition;var activationHeight=parseInt(option.activationHeight);var adminBar=option.adminBar;var mysticky_disable_down=option.mysticky_disable_down;var viewportWidth;function calcViewportWidth(e){var e=window,a='inner';if(!('innerWidth' in window)){a='client';e=document.documentElement||document.body}
4
- viewportWidth=e[a+'Width']}
5
- calcViewportWidth();var parentmysticky=mystickyClass.parentNode;var wrappermysticky=document.createElement('div');var position=0;for(var i=0;i<parentmysticky.childNodes.length;i++){if(parentmysticky.childNodes[i]==mystickyClass){position=i;break}}
6
- wrappermysticky.id='mysticky-wrap';wrappermysticky.appendChild(mystickyClass);parentmysticky.insertBefore(wrappermysticky,parentmysticky.childNodes[position]);var parentnav=mystickyClass.parentNode;var wrappernav=document.createElement('div');wrappernav.id='mysticky-nav';parentnav.replaceChild(wrappernav,mystickyClass);wrappernav.appendChild(mystickyClass);if(activationHeight=="0"){var autoActivate=!0}
7
- var mydivHeight;function initialDivHeight(){mydivHeight=(mystickyClass.offsetHeight);if(parseInt($(mystickyClass).css("marginBottom"))>0){wrappermysticky.style.marginBottom=($(mystickyClass).css("marginBottom"))}
8
- if(mydivHeight=="0"){$(mystickyClass).children().filter(':visible').each(function(){mydivHeight=$(this).outerHeight(!0)})}
9
- if(viewportWidth>=disableWidth){}}
10
- initialDivHeight();var myfixedHeight;function fixedDivHeight(){mystickyClass.classList.add('myfixed')
11
- myfixedHeight=$(".myfixed").outerHeight();if(myfixedHeight=="0"){$(".myfixed").children().filter(':visible').each(function(){myfixedHeight=$(this).outerHeight(!0)})}
12
- mystickyClass.classList.remove('myfixed')}
13
- fixedDivHeight();var adminBarHeight=0;function calcAdminBarHeight(){if((adminBar=="true")&&(viewportWidth>600)){if($("#wpadminbar")[0]){adminBarHeight=$('#wpadminbar').height()}else{adminBarHeight=0}}else{adminBarHeight=0}
14
- if(mystickyTransition=="slide"){wrappernav.style.top="-"+myfixedHeight+"px"}else{wrappernav.style.top=adminBarHeight+"px"}}
15
- calcAdminBarHeight();var mydivWidth;function initialDivWidth(){var rect=$(mystickyClass)[0].getBoundingClientRect();mydivWidth=rect.width}
16
- initialDivWidth();var deactivationHeight=activationHeight;function calcActivationHeight(){if(autoActivate==!0){if(mystickyTransition=="slide"){activationHeight=$(mystickyClass).offset().top+mydivHeight-adminBarHeight;deactivationHeight=$(mystickyClass).offset().top+mydivHeight-adminBarHeight;if(mysticky_disable_down=="on"){deactivationHeight=$(mystickyClass).offset().top-adminBarHeight}}
17
- if(mystickyTransition=="fade"){if(mysticky_disable_down=="false"){activationHeight=$(mystickyClass).offset().top-adminBarHeight;deactivationHeight=$(mystickyClass).offset().top-adminBarHeight}
18
- if(mysticky_disable_down=="on"){activationHeight=$(mystickyClass).offset().top-adminBarHeight+mydivHeight;deactivationHeight=$(mystickyClass).offset().top-adminBarHeight}}}}
19
- calcActivationHeight();function headerDeactivateOnHeight(){if(autoActivate==!0){if(mydivHeight>myfixedHeight){if(mystickyTransition=="slide"){deactivationHeight=activationHeight;if(mysticky_disable_down=="on"){deactivationHeight=activationHeight-myfixedHeight}}else{activationHeight=mydivHeight;deactivationHeight=mydivHeight}}}}
20
- headerDeactivateOnHeight();var hasScrollY='scrollY' in window;var lastScrollTop=0;function onScroll(e){if(viewportWidth>=disableWidth){if(disableLargeWidth==0||viewportWidth<=disableLargeWidth){var y=hasScrollY?window.scrollY:document.documentElement.scrollTop;if(0<=y){if(y>=lastScrollTop){y>=activationHeight?mystickyClass.classList.add('myfixed'):"";y>=activationHeight?wrappernav.classList.add('wrapfixed'):"";y>=activationHeight?wrappermysticky.style.height=mydivHeight+'px':"";y>=activationHeight?mystickyClass.style.width=mydivWidth+"px":"";if(mystickyTransition=="slide"){if(mysticky_disable_down=="false"){y>=activationHeight+myfixedHeight-adminBarHeight?wrappernav.style.top=adminBarHeight+"px":wrappernav.style.top="-"+myfixedHeight+"px"}
21
- if(mydivHeight>myfixedHeight){if(mysticky_disable_down=="false"){y<activationHeight+myfixedHeight?wrappernav.style.top="-"+mydivHeight+"px":'';y>=activationHeight+myfixedHeight?wrappernav.style.top=adminBarHeight+"px":''}}}
22
- wrappernav.classList.add('down');wrappernav.classList.remove('up');if(mysticky_disable_down=="on"){wrappernav.style.top="-"+(mydivHeight+adminBarHeight)+"px";jQuery('#mysticky-nav '+option.mystickyClass+'.elementor-sticky').hide()}}else{var x=hasScrollY?window.scrollY:document.documentElement.scrollTop;x>deactivationHeight?"":wrappermysticky.style.height="";x>deactivationHeight?"":mystickyClass.style.width="";if(mystickyTransition=="slide"){x>deactivationHeight?'':mystickyClass.classList.remove('myfixed');x>deactivationHeight?'':wrappernav.classList.remove('wrapfixed');if(mysticky_disable_down=="false"){x<deactivationHeight+myfixedHeight+200-adminBarHeight?wrappernav.style.top="-"+myfixedHeight+"px":''}}else{x>deactivationHeight?"":mystickyClass.classList.remove('myfixed');x>deactivationHeight?"":wrappernav.classList.remove('wrapfixed')}
23
- wrappernav.classList.remove('down');wrappernav.classList.add('up');if(mysticky_disable_down=="on"){wrappernav.style.top=adminBarHeight+"px";jQuery('#mysticky-nav '+option.mystickyClass).css('width',mydivWidth+"px");jQuery('#mysticky-nav '+option.mystickyClass+'.elementor-sticky').show()}}
24
- lastScrollTop=y}else{wrappernav.classList.remove('up')}}}}
25
- document.addEventListener('scroll',onScroll);var width=$(window).width()
26
- function OnResizeDocument(){if($(window).width()!=width){wrappernav.classList.remove('up');wrappernav.classList.remove('down');if($(".wrapfixed")[0]){mystickyClass.classList.remove('myfixed');wrappernav.classList.remove('wrapfixed')}else{initialDivHeight();mystickyClass.style.removeProperty("width");initialDivWidth()}
27
- calcViewportWidth();calcAdminBarHeight();fixedDivHeight();calcActivationHeight();headerDeactivateOnHeight()}}
28
- window.addEventListener('resize',OnResizeDocument);window.addEventListener('orientationchange',OnResizeDocument)})})(jQuery)
1
+ !function(e){"use strict";jQuery(document).ready(function(e){if(jQuery.browser.mobile&&!option.device_mobile)return!1;if(!jQuery.browser.mobile&&!option.device_desktop)return!1;if(e(option.mystickyClass)[0]){var t,i=document.querySelector(option.mystickyClass),o=parseInt(option.disableWidth),s=parseInt(option.disableLargeWidth),n=option.mystickyTransition,d=parseInt(option.activationHeight),r=option.adminBar,l=option.mysticky_disable_down;C();for(var a=i.parentNode,c=document.createElement("div"),m=0,p=0;p<a.childNodes.length;p++)if(a.childNodes[p]==i){m=p;break}c.id="mysticky-wrap",c.appendChild(i),a.insertBefore(c,a.childNodes[m]);var y,f,u=i.parentNode,h=document.createElement("div");if(h.id="mysticky-nav",u.replaceChild(h,i),h.appendChild(i),"0"==d)var w=!0;E(),j();var v,x=0;B(),Q();var k=d;S(),H();var L="scrollY"in window,g=0;document.addEventListener("scroll",function(e){if(t>=o&&(0==s||t<=s)){var r=L?window.scrollY:document.documentElement.scrollTop;if(0==document.documentElement.scrollTop&&h.classList.remove("wrapfixed"),0<=r){if(r>=g)r>=d&&i.classList.add("myfixed"),r>=d&&h.classList.add("wrapfixed"),r>=d&&(c.style.height=y+"px"),r>=d&&(i.style.width=v+"px"),"slide"==n&&("false"==l&&(h.style.top=r>=d+f-x?x+"px":"-"+f+"px"),y>f&&"false"==l&&(r<d+f&&(h.style.top="-"+y+"px"),r>=d+f&&(h.style.top=x+"px"))),h.classList.add("down"),h.classList.remove("up"),"on"==l&&(h.style.top="-"+(y+x)+"px",jQuery("#mysticky-nav "+option.mystickyClass+".elementor-sticky").hide());else{var a=L?window.scrollY:document.documentElement.scrollTop;!(a>k)&&(c.style.height=""),!(a>k)&&(i.style.width=""),"slide"==n?(!(a>k)&&i.classList.remove("myfixed"),!(a>k)&&h.classList.remove("wrapfixed"),"false"==l&&a<k+f+200-x&&(h.style.top="-"+f+"px")):(!(a>k)&&i.classList.remove("myfixed"),!(a>k)&&h.classList.remove("wrapfixed")),h.classList.remove("down"),h.classList.add("up"),"on"==l&&(h.style.top=x+"px",jQuery("#mysticky-nav "+option.mystickyClass).css("width",v+"px"),jQuery("#mysticky-nav "+option.mystickyClass+".elementor-sticky").show())}g=r}else h.classList.remove("up")}});var b=e(window).width();window.addEventListener("resize",N),window.addEventListener("orientationchange",N)}else console.log("myStickymenu: Entered Sticky Class does not exist, change it in Dashboard / Settings / myStickymenu / Sticky Class. ");function C(e){e=window;var i="inner";"innerWidth"in window||(i="client",e=document.documentElement||document.body),t=e[i+"Width"]}function E(){y=i.offsetHeight,parseInt(e(i).css("marginBottom"))>0&&(c.style.marginBottom=e(i).css("marginBottom")),"0"==y&&e(i).children().filter(":visible").each(function(){y=e(this).outerHeight(!0)})}function j(){i.classList.add("myfixed"),"0"==(f=e(".myfixed").outerHeight())&&e(".myfixed").children().filter(":visible").each(function(){f=e(this).outerHeight(!0)}),i.classList.remove("myfixed")}function B(){x="true"==r&&t>600&&e("#wpadminbar")[0]?e("#wpadminbar").height():0,h.style.top="slide"==n?"-"+f+"px":x+"px"}function Q(){var t=e(i)[0].getBoundingClientRect();v=t.width}function S(){1==w&&("slide"==n&&(d=e(i).offset().top+y-x,k=e(i).offset().top+y-x,"on"==l&&(k=e(i).offset().top-x)),"fade"==n&&("false"==l&&(d=e(i).offset().top-x,k=e(i).offset().top-x),"on"==l&&(d=e(i).offset().top-x+y,k=e(i).offset().top-x)))}function H(){1==w&&y>f&&("slide"==n?(k=d,"on"==l&&(k=d-f)):(d=y,k=y))}function N(){e(window).width()!=b&&(h.classList.remove("up"),h.classList.remove("down"),e(".wrapfixed")[0]||(E(),i.style.removeProperty("width"),Q()),C(),B(),j(),S(),H())}})}();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mystickymenu-popup.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="mystickymenu-popup" id="mystickymenu-intro-popup">
2
+ <div class="mystickymenu-popup-box">
3
+ <div class="mystickymenu-popup-header">
4
+ Welcome to myStickymenu &#127881;
5
+ <button class="close-mystickymenu-popup"><span class="dashicons dashicons-no-alt"></span></button>
6
+ <div class="clear"></div>
7
+ </div>
8
+ <div class="mystickymenu-popup-content">
9
+ With myStickymenu you can make your website's menu sticky. You can also use it to create a welcome notification bar. Need help? Visit our <a target="_blank" href="https://premio.io/help/mystickymenu/?utm_source=pluginonboarding">Help Center</a>.
10
+ <iframe width="420" height="240" src="https://www.youtube.com/embed/G_7swGnRmN0?rel=0&start=22"></iframe>
11
+ </div>
12
+ <div class="mystickymenu-popup-footer">
13
+ <button type="button">Go to myStickymenu</button>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ <script>
18
+ jQuery(document).ready(function(){
19
+ jQuery(document).on("click", ".mystickymenu-popup-box button, #mystickymenu-intro-popup", function(e){
20
+ e.stopPropagation();
21
+ var nonceVal = "<?php echo wp_create_nonce("mystickymenu_update_popup_status") ?>";
22
+ jQuery("#mystickymenu-intro-popup").remove();
23
+ jQuery.ajax({
24
+ type: 'POST',
25
+ url: ajaxurl,
26
+ data: {
27
+ action: 'mystickymenu_update_popup_status',
28
+ nonce: nonceVal
29
+ },
30
+ beforeSend: function (xhr) {
31
+
32
+ },
33
+ success: function (res) {
34
+
35
+ },
36
+ error: function (xhr, status, error) {
37
+
38
+ }
39
+ });
40
+ });
41
+
42
+ jQuery(document).on("click", ".mystickymenu-popup-box", function(e){
43
+ e.stopPropagation();
44
+ });
45
+ });
46
+ </script>
mystickymenu.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: myStickymenu
4
  Plugin URI: https://premio.io/
5
  Description: Simple sticky (fixed on top) menu implementation for navigation menu and Welcome bar for announcements and promotion. After install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6
- Version: 2.3.9
7
  Author: Premio
8
  Author URI: https://premio.io/downloads/mystickymenu/
9
  Text Domain: mystickymenu
@@ -12,7 +12,7 @@ License: GPLv2 or later
12
  */
13
 
14
  defined('ABSPATH') or die("Cannot access pages directly.");
15
- define( 'MYSTICKY_VERSION', '2.3.9' );
16
  require_once("mystickymenu-fonts.php");
17
  require_once("welcome-bar.php");
18
 
@@ -37,6 +37,16 @@ class MyStickyMenuBackend
37
  add_action( 'activated_plugin', array( $this, 'mystickymenu_activation_redirect' ) );
38
 
39
  add_action("wp_ajax_sticky_menu_update_status", array($this, 'sticky_menu_update_status'));
 
 
 
 
 
 
 
 
 
 
40
  }
41
 
42
  public function sticky_menu_update_status() {
@@ -69,6 +79,10 @@ class MyStickyMenuBackend
69
  $is_shown = get_option("mystickymenu_update_message");
70
  if($is_shown === false) {
71
  add_option("mystickymenu_update_message", 1);
 
 
 
 
72
  }
73
  wp_redirect( admin_url( 'admin.php?page=my-stickymenu-settings' ) ) ;
74
  exit;
@@ -91,10 +105,11 @@ class MyStickyMenuBackend
91
  wp_enqueue_script('jquery-ui-slider');
92
  //wp_enqueue_script('jquery-ui-datepicker');
93
  wp_enqueue_script( 'jquery-ui-dialog' );
 
94
 
95
  if($hook == "mystickymenu_page_my-stickymenu-upgrade") {
96
  wp_enqueue_script( 'my-select2', plugins_url('js/select2.min.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
97
- wp_enqueue_script( 'my-script-handle', plugins_url('js/iris-script.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
98
 
99
  wp_enqueue_style('my-css-select2', plugins_url('css/select2.min.css', __FILE__), array(), MYSTICKY_VERSION );
100
  }
@@ -148,6 +163,7 @@ class MyStickyMenuBackend
148
  }
149
 
150
  public function create_admin_page(){
 
151
  $upgarde_url = admin_url("admin.php?page=my-stickymenu-upgrade");
152
  // Set class property
153
  if (isset($_POST['mysticky_option_name']) && !empty($_POST['mysticky_option_name']) && isset($_POST['nonce'])) {
@@ -191,7 +207,13 @@ class MyStickyMenuBackend
191
  <input type="hidden" id="myStickymenu_update_nonce" value="<?php echo wp_create_nonce("myStickymenu_update_nonce") ?>">
192
  </div>
193
  </div>
194
- <?php } else { ?>
 
 
 
 
 
 
195
  <style>
196
  div#wpcontent {
197
  background: rgba(101,114,219,1);
@@ -373,6 +395,15 @@ class MyStickyMenuBackend
373
  <td>
374
  <input type="number" class="small-text" min="0" step="0.1" id="myfixed_transition_time" name="mysticky_option_name[myfixed_transition_time]" value="<?php echo $mysticky_options['myfixed_transition_time'];?>" />
375
  </td>
 
 
 
 
 
 
 
 
 
376
  <td>
377
  <label for="myfixed_opacity" class="mysticky_title myssticky-remove-hand"><?php _e("Sticky Opacity", 'mystickymenu')?></label>
378
  <p class="description"><?php _e( 'numbers 1-100.', 'mystickymenu');?></p>
@@ -998,6 +1029,7 @@ class MyStickyMenuFrontend
998
  echo '<style id="mystickymenu" type="text/css">';
999
  echo '#mysticky-nav { width:100%; position: static; }';
1000
  echo '#mysticky-nav.wrapfixed { position:fixed; left: 0px; margin-top:0px; z-index: '. $mysticky_options ['myfixed_zindex'] .'; -webkit-transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; -moz-transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; -o-transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=' . $mysticky_options ['myfixed_opacity'] . ')"; filter: alpha(opacity=' . $mysticky_options ['myfixed_opacity'] . '); opacity:' . $mysticky_options ['myfixed_opacity'] / 100 . '; background-color: ' . $mysticky_options ['myfixed_bgcolor'] . ';}';
 
1001
 
1002
 
1003
  if ($mysticky_options ['myfixed_disable_small_screen'] > 0 ){
3
  Plugin Name: myStickymenu
4
  Plugin URI: https://premio.io/
5
  Description: Simple sticky (fixed on top) menu implementation for navigation menu and Welcome bar for announcements and promotion. After install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6
+ Version: 2.4
7
  Author: Premio
8
  Author URI: https://premio.io/downloads/mystickymenu/
9
  Text Domain: mystickymenu
12
  */
13
 
14
  defined('ABSPATH') or die("Cannot access pages directly.");
15
+ define( 'MYSTICKY_VERSION', '2.4' );
16
  require_once("mystickymenu-fonts.php");
17
  require_once("welcome-bar.php");
18
 
37
  add_action( 'activated_plugin', array( $this, 'mystickymenu_activation_redirect' ) );
38
 
39
  add_action("wp_ajax_sticky_menu_update_status", array($this, 'sticky_menu_update_status'));
40
+
41
+ add_action("wp_ajax_mystickymenu_update_popup_status", array($this, 'mystickymenu_popup_status'));
42
+ }
43
+
44
+ public function mystickymenu_popup_status() {
45
+ if(!empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'mystickymenu_update_popup_status')) {
46
+ update_option("mystickymenu_intro_box", "hide");
47
+ }
48
+ echo esc_attr("1");
49
+ die;
50
  }
51
 
52
  public function sticky_menu_update_status() {
79
  $is_shown = get_option("mystickymenu_update_message");
80
  if($is_shown === false) {
81
  add_option("mystickymenu_update_message", 1);
82
+ }
83
+ $option = get_option("mystickymenu_intro_box");
84
+ if($option === false) {
85
+ add_option("mystickymenu_intro_box", "show");
86
  }
87
  wp_redirect( admin_url( 'admin.php?page=my-stickymenu-settings' ) ) ;
88
  exit;
105
  wp_enqueue_script('jquery-ui-slider');
106
  //wp_enqueue_script('jquery-ui-datepicker');
107
  wp_enqueue_script( 'jquery-ui-dialog' );
108
+ wp_enqueue_script( 'my-script-handle', plugins_url('js/iris-script.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
109
 
110
  if($hook == "mystickymenu_page_my-stickymenu-upgrade") {
111
  wp_enqueue_script( 'my-select2', plugins_url('js/select2.min.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
112
+
113
 
114
  wp_enqueue_style('my-css-select2', plugins_url('css/select2.min.css', __FILE__), array(), MYSTICKY_VERSION );
115
  }
163
  }
164
 
165
  public function create_admin_page(){
166
+
167
  $upgarde_url = admin_url("admin.php?page=my-stickymenu-upgrade");
168
  // Set class property
169
  if (isset($_POST['mysticky_option_name']) && !empty($_POST['mysticky_option_name']) && isset($_POST['nonce'])) {
207
  <input type="hidden" id="myStickymenu_update_nonce" value="<?php echo wp_create_nonce("myStickymenu_update_nonce") ?>">
208
  </div>
209
  </div>
210
+ <?php } else {
211
+
212
+ $option = get_option("mystickymenu_intro_box");
213
+ if($option == "show") {
214
+ include_once dirname(__FILE__) . "/mystickymenu-popup.php";
215
+ }
216
+ ?>
217
  <style>
218
  div#wpcontent {
219
  background: rgba(101,114,219,1);
395
  <td>
396
  <input type="number" class="small-text" min="0" step="0.1" id="myfixed_transition_time" name="mysticky_option_name[myfixed_transition_time]" value="<?php echo $mysticky_options['myfixed_transition_time'];?>" />
397
  </td>
398
+ <td>
399
+ <label for="myfixed_textcolor" class="mysticky_title myssticky-remove-hand"><?php _e("Sticky Text Color", 'mystickymenu')?></label>
400
+ </td>
401
+ <td>
402
+ <input type="text" id="myfixed_textcolor" name="mysticky_option_name[myfixed_textcolor]" class="my-color-field" data-alpha="true" value="<?php echo (isset($mysticky_options['myfixed_textcolor'])) ? $mysticky_options['myfixed_textcolor'] : '';?>" />
403
+
404
+ </td>
405
+ </tr>
406
+ <tr>
407
  <td>
408
  <label for="myfixed_opacity" class="mysticky_title myssticky-remove-hand"><?php _e("Sticky Opacity", 'mystickymenu')?></label>
409
  <p class="description"><?php _e( 'numbers 1-100.', 'mystickymenu');?></p>
1029
  echo '<style id="mystickymenu" type="text/css">';
1030
  echo '#mysticky-nav { width:100%; position: static; }';
1031
  echo '#mysticky-nav.wrapfixed { position:fixed; left: 0px; margin-top:0px; z-index: '. $mysticky_options ['myfixed_zindex'] .'; -webkit-transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; -moz-transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; -o-transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=' . $mysticky_options ['myfixed_opacity'] . ')"; filter: alpha(opacity=' . $mysticky_options ['myfixed_opacity'] . '); opacity:' . $mysticky_options ['myfixed_opacity'] / 100 . '; background-color: ' . $mysticky_options ['myfixed_bgcolor'] . ';}';
1032
+ echo '#mysticky-nav.wrapfixed ul li.menu-item a { color: ' . $mysticky_options ['myfixed_textcolor'] . ';}';
1033
 
1034
 
1035
  if ($mysticky_options ['myfixed_disable_small_screen'] > 0 ){
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: tomeraharon, galdub, premio
3
  Tags:menu, header, sticky menu, sticky header, floating menu, floating navigation menu, navigation menu, navigation, sticky navigation menu, welcome bar, hello bar, top bar, sticky bar, floating bar, notification bar
4
  Requires at least: 3.5.1
5
  Tested up to: 5.4
6
- Stable tag: 2.3.9
7
  License: GPLv2 or later
8
 
9
  This sticky menu plugin will make your menu or header stick to the top of page, when scrolled down and up. Also create a beautiful welcome notification bar with it.
@@ -11,7 +11,9 @@ This sticky menu plugin will make your menu or header stick to the top of page,
11
  == Description ==
12
  <strong>This sticky menu plugin will make your menu or header sticky on top of page, after desired number of pixels when scrolled. You can use it also to create a Welcome bar for announcements, promotion and more. This lightweight plugin will help your visitors navigate easily and reach to the navigation menu without wasting time. Install My Sticky Menu and improve your website’s user experience! If you want to change the CSS style, disable on scroll down or disable on specific pages. check out the <a href="https://premio.io/downloads/mystickymenu/" target="_blank" title="mystickymenu pro plans">Pro version</a>.</strong>
13
 
14
- By default, sticky menu is designed to use element class ".navbar" as "Sticky Class". That value should be modified in plugin settings for different themes to make it work. Sticky Class is actually nothing more than an element class (or id) of the element that should become sticky.
 
 
15
 
16
  <strong>📢 New feature:</strong> Welcome Bar. Use this powerful feature to create a beautiful floating sticky notification bar. No coding skill required, just turn it on, set up your announcement text and button, and voilà - your top notification bar is good to go!
17
 
@@ -36,6 +38,7 @@ My Sticky Menu is tested and compatible with Elementor website builder, Divi, WP
36
  * Fade or slide effect
37
  * Disable at small screen
38
  * Choose when to make visible on scroll
 
39
  * Change the background color
40
  * Change the opacity
41
  * Change the sticky transition time
@@ -263,6 +266,8 @@ After installing the plugin, you’ll have the option to turn on the welcome bar
263
 
264
 
265
  == Changelog ==
 
 
266
  = 2.3.9 =
267
  Notification bar fix
268
  = 2.3.8 =
3
  Tags:menu, header, sticky menu, sticky header, floating menu, floating navigation menu, navigation menu, navigation, sticky navigation menu, welcome bar, hello bar, top bar, sticky bar, floating bar, notification bar
4
  Requires at least: 3.5.1
5
  Tested up to: 5.4
6
+ Stable tag: 2.4
7
  License: GPLv2 or later
8
 
9
  This sticky menu plugin will make your menu or header stick to the top of page, when scrolled down and up. Also create a beautiful welcome notification bar with it.
11
  == Description ==
12
  <strong>This sticky menu plugin will make your menu or header sticky on top of page, after desired number of pixels when scrolled. You can use it also to create a Welcome bar for announcements, promotion and more. This lightweight plugin will help your visitors navigate easily and reach to the navigation menu without wasting time. Install My Sticky Menu and improve your website’s user experience! If you want to change the CSS style, disable on scroll down or disable on specific pages. check out the <a href="https://premio.io/downloads/mystickymenu/" target="_blank" title="mystickymenu pro plans">Pro version</a>.</strong>
13
 
14
+ By default, myStickymenu should make your menu sticky without any adjustments on your end - which means your menu should become sticky right out of the box. Sticky menu is designed to use element class ".navbar" as "Sticky Class". That value should be modified in plugin settings for different themes to make it work. Sticky Class is actually nothing more than an element class (or id) of the element that should become sticky.
15
+
16
+ [youtube https://www.youtube.com/watch?v=G_7swGnRmN0]
17
 
18
  <strong>📢 New feature:</strong> Welcome Bar. Use this powerful feature to create a beautiful floating sticky notification bar. No coding skill required, just turn it on, set up your announcement text and button, and voilà - your top notification bar is good to go!
19
 
38
  * Fade or slide effect
39
  * Disable at small screen
40
  * Choose when to make visible on scroll
41
+ * Change the font color when the menu is sticky
42
  * Change the background color
43
  * Change the opacity
44
  * Change the sticky transition time
266
 
267
 
268
  == Changelog ==
269
+ = 2.4 =
270
+ You can now change the sticky menu font color when the menu is sticky. We've also fixed a resize issue and a Divi gap bug
271
  = 2.3.9 =
272
  Notification bar fix
273
  = 2.3.8 =
welcome-bar.php CHANGED
@@ -942,6 +942,8 @@ function mysticky_welcome_bar_frontend(){
942
  } else {
943
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + mysticky_welcomebar_height + 'px' );
944
  }
 
 
945
  var welcombar_aftersubmission = $( '.mysticky-welcomebar-fixed' ).data('aftersubmission');
946
  if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
947
  var welcomebar_storage = localStorage.getItem("welcomebar_close");
@@ -955,13 +957,17 @@ function mysticky_welcome_bar_frontend(){
955
  if ( welcomebar_storage === null ){
956
 
957
  var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
 
 
958
 
959
  if ( after_trigger == 'after_a_few_seconds' ) {
 
960
  if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) {
961
  if ( $( window ).width() > 767 ) {
962
  var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
963
  var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
964
  var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
 
965
  setTimeout(function(){
966
  jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
967
  if ( welcombar_position == 'top' ) {
@@ -969,12 +975,17 @@ function mysticky_welcome_bar_frontend(){
969
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
970
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
971
  $( 'html' ).css( 'margin-bottom', '' );
 
 
 
972
  $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
973
  $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
974
  } else {
975
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
976
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
977
  $( 'html' ).css( 'margin-top', '' );
 
 
978
  $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
979
  }
980
  }, trigger_sec );
@@ -989,6 +1000,8 @@ function mysticky_welcome_bar_frontend(){
989
  var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
990
  setTimeout(function(){
991
  jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
 
 
992
  if ( welcombar_position == 'top' ) {
993
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
994
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
@@ -1008,6 +1021,7 @@ function mysticky_welcome_bar_frontend(){
1008
  mystickyelements_present();
1009
  }
1010
  $( window ).resize( function(){
 
1011
  if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
1012
  var welcomebar_storage = localStorage.getItem("welcomebar_close");
1013
  } else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) {
@@ -1019,6 +1033,11 @@ function mysticky_welcome_bar_frontend(){
1019
  }
1020
  if ( welcomebar_storage === null ){
1021
  var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
 
 
 
 
 
1022
  if ( after_trigger == 'after_a_few_seconds' ) {
1023
  var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
1024
  var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
@@ -1027,6 +1046,8 @@ function mysticky_welcome_bar_frontend(){
1027
  if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
1028
  setTimeout(function(){
1029
  jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
 
 
1030
  if ( welcombar_position == 'top' ) {
1031
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
1032
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
@@ -1049,12 +1070,17 @@ function mysticky_welcome_bar_frontend(){
1049
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
1050
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1051
  $( 'html' ).css( 'margin-bottom', '' );
 
 
 
1052
  $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
1053
  $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
1054
  } else {
1055
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
1056
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1057
  $( 'html' ).css( 'margin-top', '' );
 
 
1058
  $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
1059
  }
1060
  }, trigger_sec );
@@ -1140,12 +1166,16 @@ function mysticky_welcome_bar_frontend(){
1140
  }
1141
  var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
1142
  var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
 
 
1143
  jQuery( '.mysticky-welcomebar-fixed' ).slideUp( 'slow' );
1144
  if ( welcombar_position == 'top' ) {
1145
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '-' + mysticky_welcomebar_height + 'px' );
1146
  } else {
1147
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + mysticky_welcomebar_height + 'px' );
1148
  }
 
 
1149
  jQuery( 'html' ).css( 'margin-top', '' );
1150
  jQuery( 'html' ).css( 'margin-bottom', '' );
1151
  $( '#mysticky-nav' ).css( 'top', '0px' );
942
  } else {
943
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + mysticky_welcomebar_height + 'px' );
944
  }
945
+ var divi_topbar_height = $( '.et_fixed_nav #top-header' ).outerHeight();
946
+ var divi_total_height = mysticky_welcomebar_height + divi_topbar_height;
947
  var welcombar_aftersubmission = $( '.mysticky-welcomebar-fixed' ).data('aftersubmission');
948
  if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
949
  var welcomebar_storage = localStorage.getItem("welcomebar_close");
957
  if ( welcomebar_storage === null ){
958
 
959
  var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
960
+
961
+ jQuery( 'body' ).addClass( 'mysticky-welcomebar-apper' );
962
 
963
  if ( after_trigger == 'after_a_few_seconds' ) {
964
+
965
  if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) {
966
  if ( $( window ).width() > 767 ) {
967
  var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
968
  var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
969
  var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
970
+
971
  setTimeout(function(){
972
  jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
973
  if ( welcombar_position == 'top' ) {
975
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
976
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
977
  $( 'html' ).css( 'margin-bottom', '' );
978
+ jQuery( '#mysticky_divi_style' ).remove();
979
+ jQuery( '.et_fixed_nav #top-header' ).css( 'top', welcombar_height + 'px' );
980
+ jQuery( 'head' ).append( '<style id="mysticky_divi_style" type="text/css">.et_fixed_nav #main-header {top: ' + welcombar_height + 'px !important}.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>' );
981
  $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
982
  $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
983
  } else {
984
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
985
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
986
  $( 'html' ).css( 'margin-top', '' );
987
+ jQuery( '#mysticky_divi_style' ).remove();
988
+ jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
989
  $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
990
  }
991
  }, trigger_sec );
1000
  var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
1001
  setTimeout(function(){
1002
  jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
1003
+ jQuery( '#mysticky_divi_style' ).remove();
1004
+ jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
1005
  if ( welcombar_position == 'top' ) {
1006
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
1007
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1021
  mystickyelements_present();
1022
  }
1023
  $( window ).resize( function(){
1024
+ var mysticky_welcomebar_height = jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
1025
  if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
1026
  var welcomebar_storage = localStorage.getItem("welcomebar_close");
1027
  } else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) {
1033
  }
1034
  if ( welcomebar_storage === null ){
1035
  var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
1036
+ if ( ! $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-notapper' ) ) {
1037
+ jQuery( 'body' ).addClass( 'mysticky-welcomebar-apper' );
1038
+ } else {
1039
+ jQuery( 'body' ).removeClass( 'mysticky-welcomebar-apper' );
1040
+ }
1041
  if ( after_trigger == 'after_a_few_seconds' ) {
1042
  var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
1043
  var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
1046
  if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
1047
  setTimeout(function(){
1048
  jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
1049
+ jQuery( '#mysticky_divi_style' ).remove();
1050
+ jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
1051
  if ( welcombar_position == 'top' ) {
1052
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
1053
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1070
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
1071
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1072
  $( 'html' ).css( 'margin-bottom', '' );
1073
+ jQuery( '#mysticky_divi_style' ).remove();
1074
+ jQuery( '.mysticky-welcomebar-apper.et_fixed_nav #top-header' ).css( 'top', welcombar_height + 'px' );
1075
+ jQuery( 'head' ).append( '<style id="mysticky_divi_style" type="text/css">.mysticky-welcomebar-apper.et_fixed_nav #main-header {top: ' + welcombar_height + 'px !important}.mysticky-welcomebar-apper.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>' );
1076
  $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
1077
  $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
1078
  } else {
1079
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
1080
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1081
  $( 'html' ).css( 'margin-top', '' );
1082
+ jQuery( '#mysticky_divi_style' ).remove();
1083
+ jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
1084
  $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
1085
  }
1086
  }, trigger_sec );
1166
  }
1167
  var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
1168
  var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
1169
+ jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-notapper' );
1170
+ jQuery( 'body' ).removeClass( 'mysticky-welcomebar-apper' );
1171
  jQuery( '.mysticky-welcomebar-fixed' ).slideUp( 'slow' );
1172
  if ( welcombar_position == 'top' ) {
1173
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '-' + mysticky_welcomebar_height + 'px' );
1174
  } else {
1175
  jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + mysticky_welcomebar_height + 'px' );
1176
  }
1177
+ jQuery( '#mysticky_divi_style' ).remove();
1178
+ jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
1179
  jQuery( 'html' ).css( 'margin-top', '' );
1180
  jQuery( 'html' ).css( 'margin-bottom', '' );
1181
  $( '#mysticky-nav' ).css( 'top', '0px' );