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

Commit fc65fdf

Browse files
author
Anthony Colangelo
committed
Added touchend support. Version 1.4.1.
1 parent 786a91b commit fc65fdf

6 files changed

Lines changed: 28 additions & 26 deletions

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#<a id="docs" href="#docs">jPanelMenu</a>
22

3-
###Version 1.4.0
3+
###Version 1.4.1
44

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

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

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

530+
###<a href="#changelog-1.4.1" id="changelog-1.4.1">1.4.1</a>
531+
532+
November 11th, 2014
533+
534+
- Added `touchend` listeners for better touch support.
535+
530536
###<a href="#changelog-1.4.0" id="changelog-1.4.0">1.4.0</a>
531537

532538
November 11th, 2014

docs/index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h1 class="logo"><a href="." class="ss-list">jPanelMenu</a></h1>
4242

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

592592
<dl>
593+
<dt id="changelog-1.4.1"><a href="#changelog-1.4.1">1.4.1</a></dt>
594+
<dd>
595+
<p><time>November 11th, 2014</time></p>
596+
<ul>
597+
<li>Added <code>touchend</code> listeners for better touch support.</li>
598+
</ul>
599+
</dd>
600+
593601
<dt id="changelog-1.4.0"><a href="#changelog-1.4.0">1.4.0</a></dt>
594602
<dd>
595603
<p><time>November 11th, 2014</time></p>

docs/jquery.jpanelmenu.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
*
3-
* jPanelMenu 1.4.0 (http://jpanelmenu.com)
3+
* jPanelMenu 1.4.1 (http://jpanelmenu.com)
44
* By Anthony Colangelo (http://acolangelo.com)
55
*
66
* */
@@ -394,24 +394,19 @@
394394
},
395395

396396
initiateClickListeners: function() {
397-
$(document).on('click',jP.options.trigger,function(e){
397+
$(document).on('click touchend',jP.options.trigger,function(e){
398398
jP.triggerMenu(jP.options.animated); e.preventDefault();
399399
});
400400
},
401401

402402
destroyClickListeners: function() {
403-
$(document).off('click',jP.options.trigger,null);
403+
$(document).off('click touchend',jP.options.trigger,null);
404404
},
405405

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

409-
$(document).on('click',jP.panel,function(e){
410-
if ( jP.menuIsOpen() ) jP.closeMenu(jP.options.animated);
411-
e.preventDefault();
412-
});
413-
414-
$(document).on('touchend',jP.panel,function(e){
409+
$(document).on('click touchend',jP.panel,function(e){
415410
if ( jP.menuIsOpen() ) jP.closeMenu(jP.options.animated);
416411
e.preventDefault();
417412
});
@@ -420,8 +415,7 @@
420415
destroyContentClickListeners: function() {
421416
if ( !jP.options.closeOnContentClick ) return false;
422417

423-
$(document).off('click',jP.panel,null);
424-
$(document).off('touchend',jP.panel,null);
418+
$(document).off('click touchend',jP.panel,null);
425419
},
426420

427421
initiateKeyboardListeners: function() {

docs/js/example-jRespond.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/script.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jquery.jpanelmenu.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
*
3-
* jPanelMenu 1.4.0 (http://jpanelmenu.com)
3+
* jPanelMenu 1.4.1 (http://jpanelmenu.com)
44
* By Anthony Colangelo (http://acolangelo.com)
55
*
66
* */
@@ -394,24 +394,19 @@
394394
},
395395

396396
initiateClickListeners: function() {
397-
$(document).on('click',jP.options.trigger,function(e){
397+
$(document).on('click touchend',jP.options.trigger,function(e){
398398
jP.triggerMenu(jP.options.animated); e.preventDefault();
399399
});
400400
},
401401

402402
destroyClickListeners: function() {
403-
$(document).off('click',jP.options.trigger,null);
403+
$(document).off('click touchend',jP.options.trigger,null);
404404
},
405405

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

409-
$(document).on('click',jP.panel,function(e){
410-
if ( jP.menuIsOpen() ) jP.closeMenu(jP.options.animated);
411-
e.preventDefault();
412-
});
413-
414-
$(document).on('touchend',jP.panel,function(e){
409+
$(document).on('click touchend',jP.panel,function(e){
415410
if ( jP.menuIsOpen() ) jP.closeMenu(jP.options.animated);
416411
e.preventDefault();
417412
});
@@ -420,8 +415,7 @@
420415
destroyContentClickListeners: function() {
421416
if ( !jP.options.closeOnContentClick ) return false;
422417

423-
$(document).off('click',jP.panel,null);
424-
$(document).off('touchend',jP.panel,null);
418+
$(document).off('click touchend',jP.panel,null);
425419
},
426420

427421
initiateKeyboardListeners: function() {

0 commit comments

Comments
 (0)