Version Description
Download this release
Release Info
Developer | damiroquai |
Plugin | myStickymenu |
Version | 1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1 to 1.2
- mystickymenu.js +5 -3
- mystickymenu.php +1 -1
- readme.txt +2 -2
mystickymenu.js
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
var mysticky_navbar = document.querySelector(mysticky_name.mysticky_string);
|
2 |
var origOffsetY = mysticky_navbar.offsetTop;
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
6 |
}
|
7 |
document.addEventListener('scroll', onScroll);
|
1 |
var mysticky_navbar = document.querySelector(mysticky_name.mysticky_string);
|
2 |
var origOffsetY = mysticky_navbar.offsetTop;
|
3 |
+
var hasScrollY = 'scrollY' in window;
|
4 |
+
|
5 |
+
function onScroll(e) {
|
6 |
+
var y = hasScrollY ? window.scrollY : document.documentElement.scrollTop;
|
7 |
+
y >= origOffsetY ? mysticky_navbar.classList.add('myfixed') : mysticky_navbar.classList.remove('myfixed');
|
8 |
}
|
9 |
document.addEventListener('scroll', onScroll);
|
mystickymenu.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: myStickymenu
|
4 |
Plugin URI: http://wordpress.transformnews.com/plugins/mystickymenu-simple-sticky-fixed-on-top-menu-implementation-for-twentythirteen-menu-269
|
5 |
Description: Simple sticky (fixed on top) menu implementation for default Twentythirteen navigation menu. For other themes, after install go to Settings / myStickymenu and change navigation class to .your_navbar_class or #your_navbar_id.
|
6 |
-
Version: 1.
|
7 |
Author: m.r.d.a
|
8 |
License: GPLv2 or later
|
9 |
*/
|
3 |
Plugin Name: myStickymenu
|
4 |
Plugin URI: http://wordpress.transformnews.com/plugins/mystickymenu-simple-sticky-fixed-on-top-menu-implementation-for-twentythirteen-menu-269
|
5 |
Description: Simple sticky (fixed on top) menu implementation for default Twentythirteen navigation menu. For other themes, after install go to Settings / myStickymenu and change navigation class to .your_navbar_class or #your_navbar_id.
|
6 |
+
Version: 1.2
|
7 |
Author: m.r.d.a
|
8 |
License: GPLv2 or later
|
9 |
*/
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== myStickymenu ===
|
2 |
-
Contributors:
|
3 |
Donate link: http://wordpress.transformnews.com
|
4 |
Tags: sticky menu, twentythirteen, twenty-thirteen, plugin, menu
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 3.8.1
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
This lightweight plugin will made your Twentythirteen menu sticky on top of page after scroll hits upper border.
|
1 |
=== myStickymenu ===
|
2 |
+
Contributors: damiroquai
|
3 |
Donate link: http://wordpress.transformnews.com
|
4 |
Tags: sticky menu, twentythirteen, twenty-thirteen, plugin, menu
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 3.8.1
|
7 |
+
Stable tag: 1.2
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
This lightweight plugin will made your Twentythirteen menu sticky on top of page after scroll hits upper border.
|