Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

Commit

Permalink
Added touchend support. Version 1.4.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Colangelo committed Nov 11, 2014
1 parent 786a91b commit fc65fdf
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 26 deletions.
8 changes: 7 additions & 1 deletion README.md
@@ -1,6 +1,6 @@
#<a id="docs" href="#docs">jPanelMenu</a>

###Version 1.4.0
###Version 1.4.1

jPanelMenu is a [jQuery](http://jquery.com) plugin for easily creating and managing off-canvas content.

Expand Down Expand Up @@ -527,6 +527,12 @@ jPanelMenu is distributed freely under the [MIT License](http://opensource.org/l

#<a href="#changelog" id="#changelog">Changelog</a>

###<a href="#changelog-1.4.1" id="changelog-1.4.1">1.4.1</a>

November 11th, 2014

- Added `touchend` listeners for better touch support.

###<a href="#changelog-1.4.0" id="changelog-1.4.0">1.4.0</a>

November 11th, 2014
Expand Down
10 changes: 9 additions & 1 deletion docs/index.html
Expand Up @@ -42,7 +42,7 @@ <h1 class="logo"><a href="." class="ss-list">jPanelMenu</a></h1>

<div class="content">
<section class="intro">
<h2 id="overview"><a href="#">Version 1.4.0</a></h2>
<h2 id="overview"><a href="#">Version 1.4.1</a></h2>
<div class="text">
<p>jPanelMenu is a <a href="http://jquery.com">jQuery</a> plugin for easily creating and managing off-canvas content.</p>
<p class="jPM-specific">Just click on the menu button (the top left of this page) to see it in action.</p>
Expand Down Expand Up @@ -590,6 +590,14 @@ <h2 id="license"><a href="#license">License</a></h2>
<h2 id="changelog"><a href="#changelog">Changelog</a></h2>

<dl>
<dt id="changelog-1.4.1"><a href="#changelog-1.4.1">1.4.1</a></dt>
<dd>
<p><time>November 11th, 2014</time></p>
<ul>
<li>Added <code>touchend</code> listeners for better touch support.</li>
</ul>
</dd>

<dt id="changelog-1.4.0"><a href="#changelog-1.4.0">1.4.0</a></dt>
<dd>
<p><time>November 11th, 2014</time></p>
Expand Down
16 changes: 5 additions & 11 deletions docs/jquery.jpanelmenu.js
@@ -1,6 +1,6 @@
/**
*
* jPanelMenu 1.4.0 (http://jpanelmenu.com)
* jPanelMenu 1.4.1 (http://jpanelmenu.com)
* By Anthony Colangelo (http://acolangelo.com)
*
* */
Expand Down Expand Up @@ -394,24 +394,19 @@
},

initiateClickListeners: function() {
$(document).on('click',jP.options.trigger,function(e){
$(document).on('click touchend',jP.options.trigger,function(e){
jP.triggerMenu(jP.options.animated); e.preventDefault();
});
},

destroyClickListeners: function() {
$(document).off('click',jP.options.trigger,null);
$(document).off('click touchend',jP.options.trigger,null);
},

initiateContentClickListeners: function() {
if ( !jP.options.closeOnContentClick ) return false;

$(document).on('click',jP.panel,function(e){
if ( jP.menuIsOpen() ) jP.closeMenu(jP.options.animated);
e.preventDefault();
});

$(document).on('touchend',jP.panel,function(e){
$(document).on('click touchend',jP.panel,function(e){
if ( jP.menuIsOpen() ) jP.closeMenu(jP.options.animated);
e.preventDefault();
});
Expand All @@ -420,8 +415,7 @@
destroyContentClickListeners: function() {
if ( !jP.options.closeOnContentClick ) return false;

$(document).off('click',jP.panel,null);
$(document).off('touchend',jP.panel,null);
$(document).off('click touchend',jP.panel,null);
},

initiateKeyboardListeners: function() {
Expand Down
2 changes: 1 addition & 1 deletion docs/js/example-jRespond.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/script.min.js

Large diffs are not rendered by default.

16 changes: 5 additions & 11 deletions jquery.jpanelmenu.js
@@ -1,6 +1,6 @@
/**
*
* jPanelMenu 1.4.0 (http://jpanelmenu.com)
* jPanelMenu 1.4.1 (http://jpanelmenu.com)
* By Anthony Colangelo (http://acolangelo.com)
*
* */
Expand Down Expand Up @@ -394,24 +394,19 @@
},

initiateClickListeners: function() {
$(document).on('click',jP.options.trigger,function(e){
$(document).on('click touchend',jP.options.trigger,function(e){
jP.triggerMenu(jP.options.animated); e.preventDefault();
});
},

destroyClickListeners: function() {
$(document).off('click',jP.options.trigger,null);
$(document).off('click touchend',jP.options.trigger,null);
},

initiateContentClickListeners: function() {
if ( !jP.options.closeOnContentClick ) return false;

$(document).on('click',jP.panel,function(e){
if ( jP.menuIsOpen() ) jP.closeMenu(jP.options.animated);
e.preventDefault();
});

$(document).on('touchend',jP.panel,function(e){
$(document).on('click touchend',jP.panel,function(e){
if ( jP.menuIsOpen() ) jP.closeMenu(jP.options.animated);
e.preventDefault();
});
Expand All @@ -420,8 +415,7 @@
destroyContentClickListeners: function() {
if ( !jP.options.closeOnContentClick ) return false;

$(document).off('click',jP.panel,null);
$(document).off('touchend',jP.panel,null);
$(document).off('click touchend',jP.panel,null);
},

initiateKeyboardListeners: function() {
Expand Down

0 comments on commit fc65fdf

Please sign in to comment.