Version Description
Download this release
Release Info
Developer | sagarseth9 |
Plugin | WP Responsive Menu |
Version | 2.0.3 |
Comparing to | |
See all releases |
Code changes from version 2.0.2 to 2.0.3
- css/wprmenu.css +0 -1
- js/wprmenu.js +201 -1
- readme.txt +6 -2
- wp-responsive-menu.php +1 -1
css/wprmenu.css
CHANGED
@@ -198,7 +198,6 @@ body.admin-bar #wprmenu_menu.right {
|
|
198 |
}
|
199 |
body.admin-bar #wprmenu_bar {
|
200 |
top:46px;
|
201 |
-
padding-bottom: 47px;
|
202 |
}
|
203 |
}
|
204 |
/*1st level*/
|
198 |
}
|
199 |
body.admin-bar #wprmenu_bar {
|
200 |
top:46px;
|
|
|
201 |
}
|
202 |
}
|
203 |
/*1st level*/
|
js/wprmenu.js
CHANGED
@@ -1 +1,201 @@
|
|
1 |
-
jQuery(document).ready(function(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function( $ ) {
|
2 |
+
|
3 |
+
var bar = $('#wprmenu_bar'), //top bar that shows/hides the menu
|
4 |
+
bar_height = bar.outerHeight(true), //the bar height
|
5 |
+
from_width = wprmenu.from_width,
|
6 |
+
menu = $('#wprmenu_menu'), //the menu div
|
7 |
+
menu_ul = $('#wprmenu_menu_ul'), //the menu ul
|
8 |
+
menu_a = menu.find('a'), //single menu link
|
9 |
+
body = $('body'),
|
10 |
+
html = $('html'),
|
11 |
+
animation_speed = 300,
|
12 |
+
ab = $('#wpadminbar'),
|
13 |
+
menu_enabled = (bar.length > 0 && menu.length > 0)? true : false,
|
14 |
+
menu_width = menu.width(),
|
15 |
+
target_height = (window.innerHeight < body.height())? body.height() : window.innerHeight,
|
16 |
+
target_width = (window.innerWidth < body.width())? body.width() : window.innerWidth;
|
17 |
+
if(menu_enabled) {
|
18 |
+
|
19 |
+
menu_ul.find('li').first().css({'border-top':'none'});
|
20 |
+
|
21 |
+
|
22 |
+
$(document).mouseup(function (e) {
|
23 |
+
if ( !menu.is(e.target) && menu.has( e.target ).length === 0) {
|
24 |
+
if(menu.is(':visible') && (!menu.hasClass('top'))) {
|
25 |
+
$.sidr('close', 'wprmenu_menu');
|
26 |
+
}
|
27 |
+
}
|
28 |
+
});
|
29 |
+
//ENABLE NESTING
|
30 |
+
|
31 |
+
//add arrow element to the parent li items and chide its child uls
|
32 |
+
menu.find('ul.sub-menu').each(function() {
|
33 |
+
var sub_ul = $(this),
|
34 |
+
parent_a = sub_ul.prev('a'),
|
35 |
+
parent_li = parent_a.parent('li').first();
|
36 |
+
|
37 |
+
parent_a.addClass('wprmenu_parent_item');
|
38 |
+
parent_li.addClass('wprmenu_parent_item_li');
|
39 |
+
|
40 |
+
var expand = parent_a.before('<span class="wprmenu_icon wprmenu_icon_par icon_default"></span> ').find('.wprmenu_icon_par');
|
41 |
+
|
42 |
+
sub_ul.hide();
|
43 |
+
});
|
44 |
+
|
45 |
+
//adjust the a width on parent uls so it fits nicely with th eicon elemnt
|
46 |
+
function adjust_expandable_items() {
|
47 |
+
$('.wprmenu_parent_item_li').each(function() {
|
48 |
+
var t = $(this),
|
49 |
+
main_ul_width = 0,
|
50 |
+
icon = t.find('.wprmenu_icon_par').first(),
|
51 |
+
link = t.find('a.wprmenu_parent_item').first();
|
52 |
+
|
53 |
+
if(menu.hasClass('top')) {
|
54 |
+
main_ul_width = window.innerWidth;
|
55 |
+
} else {
|
56 |
+
main_ul_width = menu_ul.innerWidth();
|
57 |
+
}
|
58 |
+
|
59 |
+
if(t.find('.wprmenu_clear').length == 0) link.after('<br class="wprmenu_clear"/>');
|
60 |
+
});
|
61 |
+
}
|
62 |
+
adjust_expandable_items();
|
63 |
+
|
64 |
+
//expand / collapse action (SUBLEVELS)
|
65 |
+
$('.wprmenu_icon_par').on('click',function() {
|
66 |
+
var t = $(this),
|
67 |
+
//child_ul = t.next('a').next('ul');
|
68 |
+
child_ul = t.parent('li').find('ul.sub-menu').first();
|
69 |
+
child_ul.slideToggle(300);
|
70 |
+
t.toggleClass('wprmenu_par_opened');
|
71 |
+
t.parent('li').first().toggleClass('wprmenu_no_border_bottom');
|
72 |
+
});
|
73 |
+
|
74 |
+
//helper - close all submenus when menu is hiding
|
75 |
+
function close_sub_uls() {
|
76 |
+
menu.find('ul.sub-menu').each(function() {
|
77 |
+
var ul = $(this),
|
78 |
+
icon = ul.parent('li').find('.wprmenu_icon_par'),
|
79 |
+
li = ul.parent('li');
|
80 |
+
|
81 |
+
if(ul.is(':visible')) ul.slideUp(300);
|
82 |
+
icon.removeClass('wprmenu_par_opened');
|
83 |
+
li.removeClass('wprmenu_no_border_bottom');
|
84 |
+
});
|
85 |
+
}
|
86 |
+
|
87 |
+
//fix the scaling issue by adding/replacing viewport metatag
|
88 |
+
var mt = $('meta[name=viewport]');
|
89 |
+
mt = mt.length ? mt : $('<meta name="viewport" />').appendTo('head');
|
90 |
+
if(wprmenu.zooming == 'no') {
|
91 |
+
mt.attr('content', 'user-scalable=no, width=device-width, maximum-scale=1, minimum-scale=1');
|
92 |
+
} else {
|
93 |
+
mt.attr('content', 'user-scalable=yes, width=device-width, initial-scale=1.0, minimum-scale=1');
|
94 |
+
}
|
95 |
+
|
96 |
+
//Additional fixes on change device orientation
|
97 |
+
if( $.browser.mozilla ) {
|
98 |
+
screen.addEventListener("orientationchange", function() {updateOrientation()}); //firefox
|
99 |
+
} else {
|
100 |
+
window.addEventListener('orientationchange', updateOrientation, false);
|
101 |
+
}
|
102 |
+
function updateOrientation() {
|
103 |
+
window.scrollBy(1,1);
|
104 |
+
window.scrollBy(-1,-1);
|
105 |
+
|
106 |
+
menu_width = menu.width();
|
107 |
+
|
108 |
+
//update the page posion for left menu
|
109 |
+
if(menu.is(':visible') && menu.hasClass('left')) {
|
110 |
+
body.css({'left':menu_width});
|
111 |
+
body.scrollLeft(0);
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
//apply the SIDR for the left/right menu
|
119 |
+
if(menu.hasClass('left') || menu.hasClass('right')) {
|
120 |
+
|
121 |
+
//appy sidr
|
122 |
+
var hor_pos = (menu.hasClass('left'))? 'left' : 'right';
|
123 |
+
bar.sidr({
|
124 |
+
name:'wprmenu_menu',
|
125 |
+
side: hor_pos,
|
126 |
+
speed: animation_speed,
|
127 |
+
onOpen: function(){ bar.addClass('menu_is_opened'); },
|
128 |
+
onClose: function(){ bar.removeClass('menu_is_opened'); close_sub_uls(); }
|
129 |
+
});
|
130 |
+
|
131 |
+
//when link is clicked - hide the menu first and then change location to new page
|
132 |
+
menu_a.on('click', function(e) {
|
133 |
+
$.sidr('close', 'wprmenu_menu');
|
134 |
+
});
|
135 |
+
|
136 |
+
if( wprmenu.swipe != 'no' ) {
|
137 |
+
$('body').touchwipe({
|
138 |
+
wipeLeft: function() {
|
139 |
+
// Close
|
140 |
+
$.sidr('close', 'wprmenu_menu');
|
141 |
+
},
|
142 |
+
wipeRight: function() {
|
143 |
+
// Open
|
144 |
+
$.sidr('open', 'wprmenu_menu');
|
145 |
+
},
|
146 |
+
min_move_x: 60,
|
147 |
+
min_move_y: 60,
|
148 |
+
preventDefaultEvents: false
|
149 |
+
});
|
150 |
+
}
|
151 |
+
|
152 |
+
$(window).resize(function(){
|
153 |
+
target_width = (window.innerWidth < body.width())? body.width() : window.innerWidth;
|
154 |
+
if(target_width > from_width && menu.is(':visible')) {
|
155 |
+
$.sidr('close', 'wprmenu_menu');
|
156 |
+
}
|
157 |
+
});
|
158 |
+
|
159 |
+
|
160 |
+
} else if(menu.hasClass('top')) { //The top positioned menu
|
161 |
+
|
162 |
+
body.prepend(menu);
|
163 |
+
|
164 |
+
//show / hide the menu
|
165 |
+
bar.on('click', function(e) {
|
166 |
+
|
167 |
+
//scroll window top
|
168 |
+
$("html, body").animate({ scrollTop: 0 }, animation_speed);
|
169 |
+
|
170 |
+
close_sub_uls();
|
171 |
+
menu.stop(true, false).slideToggle(animation_speed);
|
172 |
+
|
173 |
+
|
174 |
+
});
|
175 |
+
|
176 |
+
|
177 |
+
//when link is clicked - hide the menu first and then change location to new page
|
178 |
+
menu_a.on('click', function(e) {
|
179 |
+
e.preventDefault();
|
180 |
+
var url = $(this).attr('href');
|
181 |
+
|
182 |
+
menu.slideUp(animation_speed,function() {
|
183 |
+
//go to the url from the link
|
184 |
+
window.location.href = url;
|
185 |
+
});
|
186 |
+
});
|
187 |
+
|
188 |
+
|
189 |
+
$(window).resize(function(){
|
190 |
+
target_width = (window.innerWidth < body.width())? body.width() : window.innerWidth;
|
191 |
+
if(target_width > from_width && menu.is(':visible')) {
|
192 |
+
close_sub_uls();
|
193 |
+
menu.slideUp(animation_speed, function() {});
|
194 |
+
}
|
195 |
+
});
|
196 |
+
|
197 |
+
|
198 |
+
} //end if class left / top /right
|
199 |
+
|
200 |
+
} //end if menu enabled
|
201 |
+
});
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: sagarseth9,magnigenie
|
|
3 |
Tags: Wordpress Responsive Menu, Genesis responsive menu, Genesis Mobile Menu, Thesis Mobile Menu, Thesis Responsive Menu, Mobile Menu, Responsive Menu Plugin, WP Responsive Menu, Wordpress mobile menu
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 3.9.2
|
6 |
-
Stable tag: 2.0.
|
7 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=sagar.seth9@gmail.com&item_name=WP%20Responsive%20Menu&return=http://magnigenie.com
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -55,6 +55,10 @@ Check out [the demo](http://magnigenie.com/wp-responsive-menu-mobile-menu-plugin
|
|
55 |
|
56 |
== ChangeLog ==
|
57 |
|
|
|
|
|
|
|
|
|
58 |
|
59 |
= Version 2.0.2 =
|
60 |
|
@@ -79,6 +83,6 @@ Check out [the demo](http://magnigenie.com/wp-responsive-menu-mobile-menu-plugin
|
|
79 |
|
80 |
== Upgrade Notice ==
|
81 |
|
82 |
-
= Version 2.0.
|
83 |
|
84 |
* As I have updated the plugin options panel so there might be few settings problems. If you are having any such problem try to check the plugin settings and configure it accordingly.
|
3 |
Tags: Wordpress Responsive Menu, Genesis responsive menu, Genesis Mobile Menu, Thesis Mobile Menu, Thesis Responsive Menu, Mobile Menu, Responsive Menu Plugin, WP Responsive Menu, Wordpress mobile menu
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 3.9.2
|
6 |
+
Stable tag: 2.0.3
|
7 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=sagar.seth9@gmail.com&item_name=WP%20Responsive%20Menu&return=http://magnigenie.com
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
55 |
|
56 |
== ChangeLog ==
|
57 |
|
58 |
+
= Version 2.0.3 =
|
59 |
+
|
60 |
+
* Fixed the submenu icon not showing error.
|
61 |
+
* Fixed menu spacing issue.
|
62 |
|
63 |
= Version 2.0.2 =
|
64 |
|
83 |
|
84 |
== Upgrade Notice ==
|
85 |
|
86 |
+
= Version 2.0.3 =
|
87 |
|
88 |
* As I have updated the plugin options panel so there might be few settings problems. If you are having any such problem try to check the plugin settings and configure it accordingly.
|
wp-responsive-menu.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP Responsive Menu
|
4 |
Plugin URI: http://magnigenie.com/wp-responsive-menu-mobile-menu-plugin-wordpress/
|
5 |
Description: WP Responsive menu is a mobile menu plugin which comes with 1 click installation and has lots of admin option to customize the plugin as per your needs.
|
6 |
-
Version: 2.0.
|
7 |
Author: Nirmal Ram
|
8 |
Author URI: http://magnigenie.com
|
9 |
License: GPLv2 or later
|
3 |
Plugin Name: WP Responsive Menu
|
4 |
Plugin URI: http://magnigenie.com/wp-responsive-menu-mobile-menu-plugin-wordpress/
|
5 |
Description: WP Responsive menu is a mobile menu plugin which comes with 1 click installation and has lots of admin option to customize the plugin as per your needs.
|
6 |
+
Version: 2.0.3
|
7 |
Author: Nirmal Ram
|
8 |
Author URI: http://magnigenie.com
|
9 |
License: GPLv2 or later
|