Version Description
- Fixed minification bug
Download this release
Release Info
Developer | senff |
Plugin | Sticky Menu (or Anything!) on Scroll |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1 to 2.1.1
- README.md +7 -1
- assets/js/jq-sticky-anything.js +1 -1
- assets/js/jq-sticky-anything.min.js +2 -2
- assets/js/stickThis.js +1 -1
- assets/js/sticky-anything-admin.js +1 -1
- readme.txt +7 -1
- sticky-menu-or-anything.php +4 -4
README.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Plugin URI: http://www.senff.com/plugins/sticky-anything-wp
|
6 |
* Requires at least: 3.6
|
7 |
* Tested up to: 4.9
|
8 |
-
* Stable tag: 2.1
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -134,6 +134,9 @@ If the customization is fairly minor, I can probably help out right away. Howeve
|
|
134 |
|
135 |
## Changelog
|
136 |
|
|
|
|
|
|
|
137 |
### 2.1
|
138 |
* Sticky element has specific classes to target sticky/non-sticky state: ".element-is-sticky" and ".element-is-not-sticky"
|
139 |
|
@@ -195,6 +198,9 @@ If the customization is fairly minor, I can probably help out right away. Howeve
|
|
195 |
|
196 |
## Upgrade Notice
|
197 |
|
|
|
|
|
|
|
198 |
## 2.1
|
199 |
* Functionality for targeting sticky/non-sticky classnames added
|
200 |
|
5 |
* Plugin URI: http://www.senff.com/plugins/sticky-anything-wp
|
6 |
* Requires at least: 3.6
|
7 |
* Tested up to: 4.9
|
8 |
+
* Stable tag: 2.1.1
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
134 |
|
135 |
## Changelog
|
136 |
|
137 |
+
### 2.1.1
|
138 |
+
* Fixed minification bug
|
139 |
+
|
140 |
### 2.1
|
141 |
* Sticky element has specific classes to target sticky/non-sticky state: ".element-is-sticky" and ".element-is-not-sticky"
|
142 |
|
198 |
|
199 |
## Upgrade Notice
|
200 |
|
201 |
+
## 2.1.1
|
202 |
+
* Bug fixes
|
203 |
+
|
204 |
## 2.1
|
205 |
* Functionality for targeting sticky/non-sticky classnames added
|
206 |
|
assets/js/jq-sticky-anything.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* @preserve Sticky Anything 2.1 | @senff | GPL2 Licensed
|
3 |
*/
|
4 |
|
5 |
console.error('PLEASE NOTE: this is just a notification that the Sticky Menu (or Anything!) plugin is now working in Debug Mode.');
|
1 |
/**
|
2 |
+
* @preserve Sticky Anything 2.1.1 | @senff | GPL2 Licensed
|
3 |
*/
|
4 |
|
5 |
console.error('PLEASE NOTE: this is just a notification that the Sticky Menu (or Anything!) plugin is now working in Debug Mode.');
|
assets/js/jq-sticky-anything.min.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
-
* @preserve Sticky Anything 2.1 | @senff | GPL2 Licensed
|
3 |
*/
|
4 |
|
5 |
var stickyAnythingBreakpoint = '' // solely to use as a debugging breakpoint, if needed.
|
6 |
|
7 |
-
!function(e){function t(t,i,n,l,
|
1 |
/**
|
2 |
+
* @preserve Sticky Anything 2.1.1 | @senff | GPL2 Licensed
|
3 |
*/
|
4 |
|
5 |
var stickyAnythingBreakpoint = '' // solely to use as a debugging breakpoint, if needed.
|
6 |
|
7 |
+
!function(e){function t(t,i,n,s,l,o,r,d){$listenerElement=e(".sticky-element-active");var c=$listenerElement.offset();if(orgElementTop=c.top,l){var a=e(l).offset();pushElementTop=a.top}var m=window,g="inner";if("innerWidth"in window||(g="client",m=document.documentElement||document.body),viewport=m[g+"Width"],o&&e("body").hasClass("admin-bar")&&viewport>600?adminBarHeight=e("#wpadminbar").height():adminBarHeight=0,e(window).scrollTop()>=orgElementTop-t-adminBarHeight&&viewport>=i&&viewport<=n){coordsOrgElement=$listenerElement.offset(),leftOrgElement=coordsOrgElement.left,widthPlaceholder=$listenerElement[0].getBoundingClientRect().width,widthPlaceholder||(widthPlaceholder=$listenerElement.css("width")),heightPlaceholder=$listenerElement[0].getBoundingClientRect().height,heightPlaceholder||(heightPlaceholder=$listenerElement.css("height")),widthSticky=e(".sticky-element-original").css("width"),"0px"==widthSticky&&(widthSticky=e(".sticky-element-original")[0].getBoundingClientRect().width),heightSticky=e(".sticky-element-original").height(),paddingOrgElement=[e(".sticky-element-original").css("padding-top"),e(".sticky-element-original").css("padding-right"),e(".sticky-element-original").css("padding-bottom"),e(".sticky-element-original").css("padding-left")],paddingSticky=paddingOrgElement[0]+" "+paddingOrgElement[1]+" "+paddingOrgElement[2]+" "+paddingOrgElement[3],marginOrgElement=[$listenerElement.css("margin-top"),$listenerElement.css("margin-right"),$listenerElement.css("margin-bottom"),$listenerElement.css("margin-left")],marginPlaceholder=marginOrgElement[0]+" "+marginOrgElement[1]+" "+marginOrgElement[2]+" "+marginOrgElement[3],assignedStyles="";for(var h in r)"inline"==r[h]?assignedStyles+=h+":inline-block; ":assignedStyles+=h+":"+r[h]+"; ";elementHeight=0,heightPlaceholder<1?elementHeight=e(".sticky-element-cloned").outerHeight():elementHeight=e(".sticky-element-original").outerHeight(),l&&e(window).scrollTop()>pushElementTop-t-elementHeight-adminBarHeight?stickyTopMargin=pushElementTop-t-elementHeight-e(window).scrollTop():stickyTopMargin=adminBarHeight,assignedStyles+="width:"+widthPlaceholder+"px; height:"+heightPlaceholder+"px; margin:"+marginPlaceholder+";",e(".sticky-element-original").removeClass("sticky-element-active").removeClass("element-is-not-sticky").addClass("element-is-sticky").css("position","fixed").css("left",leftOrgElement+"px").css("top",t+"px").css("width",widthSticky).css("margin-left",0).css("padding",paddingSticky).css("margin-top",stickyTopMargin).css("z-index",s),e(".sticky-element-placeholder").hasClass("sticky-element-active")||e(".sticky-element-placeholder").addClass("sticky-element-active").attr("style",assignedStyles)}else e(".sticky-element-original").addClass("sticky-element-active").removeClass("element-is-sticky").addClass("element-is-not-sticky").attr("style",d),e(".sticky-element-placeholder").hasClass("sticky-element-active")&&e(".sticky-element-placeholder").removeClass("sticky-element-active").removeAttr("style").css("width","0").css("height","0").css("margin","0").css("padding","0")}function i(){e(".sticky-element-original").addClass("sticky-element-active").before('<div class="sticky-element-placeholder" style="width:0; height:0; margin:0; padding:0; visibility:hidden;"></div>')}function n(e){return o={},o.display=e.css("display"),o.float=e.css("float"),o.flex=e.css("flex"),o["box-sizing"]=e.css("box-sizing"),o.clear=e.css("clear"),o.overflow=e.css("overflow"),o.transform=e.css("transform"),o}function s(t,i,n,s,o,r,d){var c=e(".sticky-element-original").offset();if(orgElementTop=c.top,o){var a=e(o).offset();pushElementTop=a.top}var m=window,g="inner";"innerWidth"in window||(g="client",m=document.documentElement||document.body),viewport=m[g+"Width"],d&&e("body").hasClass("admin-bar")&&viewport>600?adminBarHeight=e("#wpadminbar").height():adminBarHeight=0,e(window).scrollTop()>=orgElementTop-t-adminBarHeight&&viewport>=i&&viewport<=n?(orgElement=e(".sticky-element-original"),coordsOrgElement=orgElement.offset(),leftOrgElement=coordsOrgElement.left,widthOrgElement=orgElement[0].getBoundingClientRect().width,widthOrgElement||(widthOrgElement=orgElement.css("width")),heightOrgElement=orgElement.outerHeight(),paddingOrgElement=[orgElement.css("padding-top"),orgElement.css("padding-right"),orgElement.css("padding-bottom"),orgElement.css("padding-left")],paddingCloned=paddingOrgElement[0]+" "+paddingOrgElement[1]+" "+paddingOrgElement[2]+" "+paddingOrgElement[3],1==r&&e(".sticky-element-cloned").length<1&&l(t,s),elementHeight=0,heightOrgElement<1?elementHeight=e(".sticky-element-cloned").outerHeight():elementHeight=e(".sticky-element-original").outerHeight(),o&&e(window).scrollTop()>pushElementTop-t-elementHeight-adminBarHeight?stickyTopMargin=pushElementTop-t-elementHeight-e(window).scrollTop():stickyTopMargin=adminBarHeight,e(".sticky-element-cloned").css("left",leftOrgElement+"px").css("top",t+"px").css("width",widthOrgElement).css("margin-top",stickyTopMargin).css("padding",paddingCloned).show(),e(".sticky-element-original").css("visibility","hidden")):(1==r?e(".sticky-element-cloned").remove():e(".sticky-element-cloned").hide(),e(".sticky-element-original").css("visibility","visible"))}function l(t,i){e(".sticky-element-original").clone().insertAfter(e(".sticky-element-original")).addClass("sticky-element-cloned").removeClass("element-is-not-sticky").addClass("element-is-sticky").css("position","fixed").css("top",t+"px").css("margin-left","0").css("z-index",i).removeClass("sticky-element-original").hide()}e.fn.stickThis=function(o){var r=e.extend({top:0,minscreenwidth:0,maxscreenwidth:99999,zindex:1,legacymode:!1,dynamicmode:!1,debugmode:!1,pushup:"",adminbar:!1},o),d=e(this).length,c=e(r.pushup).length;return c<1?(1==r.debugmode&&r.pushup&&console.error('STICKY ANYTHING DEBUG: There are no elements with the selector/class/ID you selected for the Push-up element ("'+r.pushup+'").'),r.pushup=""):c>1&&(1==r.debugmode&&console.error("STICKY ANYTHING DEBUG: There are "+c+' elements on the page with the selector/class/ID you selected for the push-up element ("'+r.pushup+'"). You can select only ONE element to push the sticky element up.'),r.pushup=""),d<1?1==r.debugmode&&console.error('STICKY ANYTHING DEBUG: There are no elements with the selector/class/ID you selected for the sticky element ("'+this.selector+'").'):d>1?1==r.debugmode&&console.error("STICKY ANYTHING DEBUG: There There are "+c+' elements with the selector/class/ID you selected for the sticky element ("'+this.selector+'"). You can only make ONE element sticky.'):1==r.legacymode?(e(this).addClass("sticky-element-original").addClass("element-is-not-sticky"),1!=r.dynamicmode&&l(r.top,r.zindex,r.adminbar),checkElement=setInterval(function(){s(r.top,r.minscreenwidth,r.maxscreenwidth,r.zindex,r.pushup,r.dynamicmode,r.adminbar)},10)):(e(this).addClass("sticky-element-original").addClass("element-is-not-sticky"),orgAssignedStyles=n(e(this)),orgInlineStyles=e(".sticky-element-original").attr("style"),null==orgInlineStyles&&(orgInlineStyles=""),i(),checkElement=setInterval(function(){t(r.top,r.minscreenwidth,r.maxscreenwidth,r.zindex,r.pushup,r.adminbar,orgAssignedStyles,orgInlineStyles)},10)),this}}(jQuery);
|
assets/js/stickThis.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* @preserve Sticky Anything 2.1 | @senff | GPL2 Licensed
|
3 |
*/
|
4 |
|
5 |
(function($) {
|
1 |
/**
|
2 |
+
* @preserve Sticky Anything 2.1.1 | @senff | GPL2 Licensed
|
3 |
*/
|
4 |
|
5 |
(function($) {
|
assets/js/sticky-anything-admin.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* @preserve Sticky Anything 2.1 | @senff | GPL2 Licensed
|
3 |
*/
|
4 |
|
5 |
jQuery(function($) {
|
1 |
/**
|
2 |
+
* @preserve Sticky Anything 2.1.1 | @senff | GPL2 Licensed
|
3 |
*/
|
4 |
|
5 |
jQuery(function($) {
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: sticky header, sticky menu, sticky, header, menu
|
|
5 |
Plugin URI: http://www.senff.com/plugins/sticky-anything-wp
|
6 |
Requires at least: 3.6
|
7 |
Tested up to: 4.9
|
8 |
-
Stable tag: 2.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -133,6 +133,9 @@ If the customization is fairly minor, I can probably help out right away. Howeve
|
|
133 |
|
134 |
== Changelog ==
|
135 |
|
|
|
|
|
|
|
136 |
= 2.1 =
|
137 |
* Sticky element has specific classes to target sticky/non-sticky state: ".element-is-sticky" and ".element-is-not-sticky"
|
138 |
|
@@ -194,6 +197,9 @@ If the customization is fairly minor, I can probably help out right away. Howeve
|
|
194 |
|
195 |
== Upgrade Notice ==
|
196 |
|
|
|
|
|
|
|
197 |
= 2.1 =
|
198 |
* Functionality for targeting sticky/non-sticky classnames added
|
199 |
|
5 |
Plugin URI: http://www.senff.com/plugins/sticky-anything-wp
|
6 |
Requires at least: 3.6
|
7 |
Tested up to: 4.9
|
8 |
+
Stable tag: 2.1.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
133 |
|
134 |
== Changelog ==
|
135 |
|
136 |
+
= 2.1.1 =
|
137 |
+
* Fixed minification bug
|
138 |
+
|
139 |
= 2.1 =
|
140 |
* Sticky element has specific classes to target sticky/non-sticky state: ".element-is-sticky" and ".element-is-not-sticky"
|
141 |
|
197 |
|
198 |
== Upgrade Notice ==
|
199 |
|
200 |
+
= 2.1.1 =
|
201 |
+
* Bug fixes
|
202 |
+
|
203 |
= 2.1 =
|
204 |
* Functionality for targeting sticky/non-sticky classnames added
|
205 |
|
sticky-menu-or-anything.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.senff.com/plugins/sticky-anything-wp
|
|
5 |
Description: Pick any element on your page, and it will stick when it reaches the top of the page when you scroll down. Usually handy for navigation menus, but can be used for any (unique) element on your page.
|
6 |
Author: Mark Senff
|
7 |
Author URI: http://www.senff.com
|
8 |
-
Version: 2.1
|
9 |
*/
|
10 |
|
11 |
defined('ABSPATH') or die('INSERT COIN');
|
@@ -21,7 +21,7 @@ defined('ABSPATH') or die('INSERT COIN');
|
|
21 |
*/
|
22 |
if (!function_exists('sticky_anthing_default_options')) {
|
23 |
function sticky_anthing_default_options() {
|
24 |
-
$versionNum = '2.1';
|
25 |
if (get_option('sticky_anything_options') === false) {
|
26 |
$new_options['sa_version'] = $versionNum;
|
27 |
$new_options['sa_element'] = '';
|
@@ -46,7 +46,7 @@ if (!function_exists('sticky_anthing_default_options')) {
|
|
46 |
*/
|
47 |
if (!function_exists('sticky_anything_update')) {
|
48 |
function sticky_anything_update() {
|
49 |
-
$versionNum = '2.1';
|
50 |
$existing_options = get_option('sticky_anything_options');
|
51 |
|
52 |
if(!isset($existing_options['sa_minscreenwidth'])) {
|
@@ -521,7 +521,7 @@ if (!function_exists('sticky_anything_styles')) {
|
|
521 |
return;
|
522 |
}
|
523 |
|
524 |
-
wp_register_script('stickyAnythingAdminScript', plugins_url('/assets/js/sticky-anything-admin.js', __FILE__), array( 'jquery' ), '2.1');
|
525 |
wp_enqueue_script('stickyAnythingAdminScript');
|
526 |
|
527 |
wp_register_style('stickyAnythingAdminStyle', plugins_url('/assets/css/sticky-anything-admin.css', __FILE__) );
|
5 |
Description: Pick any element on your page, and it will stick when it reaches the top of the page when you scroll down. Usually handy for navigation menus, but can be used for any (unique) element on your page.
|
6 |
Author: Mark Senff
|
7 |
Author URI: http://www.senff.com
|
8 |
+
Version: 2.1.1
|
9 |
*/
|
10 |
|
11 |
defined('ABSPATH') or die('INSERT COIN');
|
21 |
*/
|
22 |
if (!function_exists('sticky_anthing_default_options')) {
|
23 |
function sticky_anthing_default_options() {
|
24 |
+
$versionNum = '2.1.1';
|
25 |
if (get_option('sticky_anything_options') === false) {
|
26 |
$new_options['sa_version'] = $versionNum;
|
27 |
$new_options['sa_element'] = '';
|
46 |
*/
|
47 |
if (!function_exists('sticky_anything_update')) {
|
48 |
function sticky_anything_update() {
|
49 |
+
$versionNum = '2.1.1';
|
50 |
$existing_options = get_option('sticky_anything_options');
|
51 |
|
52 |
if(!isset($existing_options['sa_minscreenwidth'])) {
|
521 |
return;
|
522 |
}
|
523 |
|
524 |
+
wp_register_script('stickyAnythingAdminScript', plugins_url('/assets/js/sticky-anything-admin.js', __FILE__), array( 'jquery' ), '2.1.1');
|
525 |
wp_enqueue_script('stickyAnythingAdminScript');
|
526 |
|
527 |
wp_register_style('stickyAnythingAdminStyle', plugins_url('/assets/css/sticky-anything-admin.css', __FILE__) );
|