Skip to content

Commit

Permalink
Merge pull request #66 from FinalAngel/bugfix/mobile-menu-overlay
Browse files Browse the repository at this point in the history
move overlay initialization
  • Loading branch information
vxsx committed Mar 21, 2015
2 parents fa73dbc + f2dfbc1 commit da2ad92
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- name: lightbox
version: 1.2.2
- name: mobilemenu
version: 1.1.6
version: 1.1.7
- name: uniform
version: 1.2.3

Expand Down
6 changes: 5 additions & 1 deletion src/cl.mobilemenu/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Cl.MobileMenu
=============

1.1.7
-----
- moved overlay initialization from ``toggle`` to ``show``

1.1.6
-----
- added option ``heightCalc``
Expand Down Expand Up @@ -56,4 +60,4 @@ Cl.MobileMenu

1.0.0
-----
- initial release
- initial release
12 changes: 6 additions & 6 deletions src/cl.mobilemenu/cl.mobilemenu.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* @author Angelo Dini - github.com/finalangel/classjs-plugins
* @copyright Distributed under the BSD License.
* @version 1.1.6
* @version 1.1.7
*/

// ensure namespace is defined
Expand Down Expand Up @@ -81,15 +81,15 @@ var Cl = window.Cl || {};
toggle: function () {
if(this.visible) { this.hide(); } else { this.show(); }

// if not initialized, inject overlay
if(!this.initialized) $(this.options.overlayContainer).append(this.overlay);
this.initialized = true;

// trigger callback
this._fire('toggle');
},

show: function (speed) {
// if not initialized, inject overlay
if(!this.initialized) $(this.options.overlayContainer).append(this.overlay);
this.initialized = true;

// validate if toolbar should be shown
if(!this._validate()) return false;

Expand Down Expand Up @@ -183,4 +183,4 @@ var Cl = window.Cl || {};

});

})(jQuery);
})(jQuery);
2 changes: 1 addition & 1 deletion src/cl.mobilemenu/cl.mobilemenu.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit da2ad92

Please sign in to comment.