WPFront Scroll Top - Version 1.4.4

Version Description

  • Zerif theme compatibility fix.
Download this release

Release Info

Developer syammohanm
Plugin Icon 128x128 WPFront Scroll Top
Version 1.4.4
Comparing to
See all releases

Code changes from version 1.4.3 to 1.4.4

classes/class-wpfront-scroll-top.php CHANGED
@@ -36,7 +36,7 @@ if (!class_exists('WPFront_Scroll_Top')) {
36
  class WPFront_Scroll_Top extends WPFront_Base {
37
 
38
  //Constants
39
- const VERSION = '1.4.3';
40
  const OPTIONS_GROUP_NAME = 'wpfront-scroll-top-options-group';
41
  const OPTION_NAME = 'wpfront-scroll-top-options';
42
  const PLUGIN_SLUG = 'wpfront-scroll-top';
36
  class WPFront_Scroll_Top extends WPFront_Base {
37
 
38
  //Constants
39
+ const VERSION = '1.4.4';
40
  const OPTIONS_GROUP_NAME = 'wpfront-scroll-top-options-group';
41
  const OPTION_NAME = 'wpfront-scroll-top-options';
42
  const PLUGIN_SLUG = 'wpfront-scroll-top';
js/wpfront-scroll-top.js CHANGED
@@ -10,10 +10,10 @@
10
 
11
  */
12
 
13
- (function() {
14
  var $ = jQuery;
15
 
16
- window.wpfront_scroll_top = function(data) {
17
  var container = $("#wpfront-scroll-top-container").css("opacity", 0);
18
 
19
  var css = {};
@@ -55,48 +55,56 @@
55
  var mouse_over = false;
56
  var hideEventID = 0;
57
 
58
- var fnHide = function() {
59
  clearTimeout(hideEventID);
60
  if (container.is(":visible")) {
61
- container.stop().fadeTo(data.button_fade_duration, 0, function() {
62
  container.hide();
63
  mouse_over = false;
64
  });
65
  }
66
  };
67
 
68
- var fnHideEvent = function() {
69
  clearTimeout(hideEventID);
70
- hideEventID = setTimeout(function() {
71
  fnHide();
72
  }, data.auto_hide_after * 1000);
73
  };
74
 
75
- $(window).scroll(function() {
76
- if ($(this).scrollTop() > data.scroll_offset) {
77
- container.stop().css("opacity", 1).show();
78
- if (!mouse_over) {
79
- container.css("opacity", data.button_opacity);
80
- if (data.auto_hide) {
81
- fnHideEvent();
82
- }
 
 
 
83
  }
84
  } else {
85
  fnHide();
86
  }
87
- });
 
 
 
 
 
88
 
89
  container
90
- .hover(function() {
91
  clearTimeout(hideEventID);
92
  mouse_over = true;
93
  $(this).css("opacity", 1);
94
- }, function() {
95
  $(this).css("opacity", data.button_opacity);
96
  mouse_over = false;
97
  fnHideEvent();
98
  })
99
- .click(function() {
100
  $("html, body").animate({scrollTop: 0}, data.scroll_duration);
101
  return false;
102
  });
10
 
11
  */
12
 
13
+ (function () {
14
  var $ = jQuery;
15
 
16
+ window.wpfront_scroll_top = function (data) {
17
  var container = $("#wpfront-scroll-top-container").css("opacity", 0);
18
 
19
  var css = {};
55
  var mouse_over = false;
56
  var hideEventID = 0;
57
 
58
+ var fnHide = function () {
59
  clearTimeout(hideEventID);
60
  if (container.is(":visible")) {
61
+ container.stop().fadeTo(data.button_fade_duration, 0, function () {
62
  container.hide();
63
  mouse_over = false;
64
  });
65
  }
66
  };
67
 
68
+ var fnHideEvent = function () {
69
  clearTimeout(hideEventID);
70
+ hideEventID = setTimeout(function () {
71
  fnHide();
72
  }, data.auto_hide_after * 1000);
73
  };
74
 
75
+ var scrollHandled = false;
76
+ var fnScroll = function () {
77
+ if (scrollHandled)
78
+ return;
79
+
80
+ scrollHandled = true;
81
+
82
+ if ($(window).scrollTop() > data.scroll_offset) {
83
+ container.stop().css("opacity", mouse_over ? 1 : data.button_opacity).show();
84
+ if (!mouse_over && data.auto_hide) {
85
+ fnHideEvent();
86
  }
87
  } else {
88
  fnHide();
89
  }
90
+
91
+ scrollHandled = false;
92
+ };
93
+
94
+ $(window).scroll(fnScroll);
95
+ $(document).scroll(fnScroll);
96
 
97
  container
98
+ .hover(function () {
99
  clearTimeout(hideEventID);
100
  mouse_over = true;
101
  $(this).css("opacity", 1);
102
+ }, function () {
103
  $(this).css("opacity", data.button_opacity);
104
  mouse_over = false;
105
  fnHideEvent();
106
  })
107
+ .click(function () {
108
  $("html, body").animate({scrollTop: 0}, data.scroll_duration);
109
  return false;
110
  });
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: syammohanm
3
  Donate link: http://wpfront.com/donate/
4
  Tags: back, back to top, navigation, navigate, page, scroll, scroll to top, scroll top, scroll up, top, up
5
  Requires at least: 3.0
6
- Tested up to: 4.2.2
7
- Stable tag: 1.4.3
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -59,6 +59,9 @@ No one has asked anything yet.
59
 
60
  == Changelog ==
61
 
 
 
 
62
  = 1.4.3 =
63
  * Media upload bug fix.
64
 
@@ -100,6 +103,9 @@ No one has asked anything yet.
100
 
101
  == Upgrade Notice ==
102
 
 
 
 
103
  = 1.4.3 =
104
  * Bug fix.
105
 
@@ -134,4 +140,3 @@ No one has asked anything yet.
134
  * Initial release
135
 
136
 
137
-
3
  Donate link: http://wpfront.com/donate/
4
  Tags: back, back to top, navigation, navigate, page, scroll, scroll to top, scroll top, scroll up, top, up
5
  Requires at least: 3.0
6
+ Tested up to: 4.3
7
+ Stable tag: 1.4.4
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
59
 
60
  == Changelog ==
61
 
62
+ = 1.4.4 =
63
+ * Zerif theme compatibility fix.
64
+
65
  = 1.4.3 =
66
  * Media upload bug fix.
67
 
103
 
104
  == Upgrade Notice ==
105
 
106
+ = 1.4.4 =
107
+ * Compatibility fix.
108
+
109
  = 1.4.3 =
110
  * Bug fix.
111
 
140
  * Initial release
141
 
142
 
 
wpfront-scroll-top.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WPFront Scroll Top
4
  * Plugin URI: http://wpfront.com/scroll-top-plugin/
5
  * Description: Allows the visitor to easily scroll back to the top of the page.
6
- * Version: 1.4.3
7
  * Author: Syam Mohan
8
  * Author URI: http://wpfront.com
9
  * License: GPL v3
3
  * Plugin Name: WPFront Scroll Top
4
  * Plugin URI: http://wpfront.com/scroll-top-plugin/
5
  * Description: Allows the visitor to easily scroll back to the top of the page.
6
+ * Version: 1.4.4
7
  * Author: Syam Mohan
8
  * Author URI: http://wpfront.com
9
  * License: GPL v3