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

Commit

Permalink
Updated to 1.3.0.
Browse files Browse the repository at this point in the history
- Added new option: closeOnContentClick.
  • Loading branch information
acolangelo committed Feb 5, 2013
1 parent f965495 commit a715b37
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 14 deletions.
18 changes: 17 additions & 1 deletion README.md
@@ -1,6 +1,6 @@
#<a id="docs" href="#docs">jPanelMenu</a>

###Version 1.2.0
###Version 1.3.0

jPanelMenu is a [jQuery](http://jquery.com) plugin that creates a paneled-style menu (like the type seen in the mobile versions of [Facebook](http://m.facebook.com) and [Google](http://google.com), as well as in many native iPhone applications).

Expand Down Expand Up @@ -137,6 +137,16 @@ When using the API functions [`open( )`](#api-open), [`close()`](#api-close), an

***

###<a href="#options-closeOnContentClick" id="options-closeOnContentClick">closeOnContentClick</a>

A boolean value specifying whether or not the menu should be closed when clicking on the panel content.

- **Data Type:** `boolean`
- **Accepted Values:** `true` or `false`
- **Default Value:** `true`

***

###<a href="#options-keyboardShortcuts" id="options-keyboardShortcuts">keyboardShortcuts</a>

An option that allows you to control if keyboard shortcuts are enabled, and if they are, which keys do what.
Expand Down Expand Up @@ -491,6 +501,12 @@ And please, [let me know](http://acolangelo.com/contact) when you launch somethi

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

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

February 4th, 2013

- Added new option: [`closeOnContentClick`](#options-closeOnContentClick)

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

February 3rd, 2013
Expand Down
24 changes: 21 additions & 3 deletions docs/index.html
Expand Up @@ -42,14 +42,14 @@ <h1 class="logo"><a href="." class="ss-list">jPanelMenu</a></h1>

<div class="content">
<section class="intro">
<h2 id="overview"><a href="#">Version 1.2.0</a></h2>
<h2 id="overview"><a href="#">Version 1.3.0</a></h2>
<div class="text">
<p>jPanelMenu is a <a href="http://jquery.com">jQuery</a> plugin that creates a paneled-style menu (like the type seen in the mobile versions of <a href="http://m.facebook.com">Facebook</a> and <a href="http://google.com">Google</a>, as well as in many native iPhone applications).</p>
<p class="jPM-specific">Just click on the menu button (the top left of this page) to see it in action.</p>
<p>Check out the <a href="#changelog">changelog</a> to see what&rsquo;s new in version 1.2.0.</p>
<p>Check out the <a href="#changelog">changelog</a> to see what&rsquo;s new in version 1.3.0.</p>
</div>
<div class="download">
<p><a href="../jquery.jpanelmenu.min.js" title="jPanelMenu 1.2.0 (Minifed)" class="button ss-download">Download jPanelMenu</a></p>
<p><a href="../jquery.jpanelmenu.min.js" title="jPanelMenu 1.3.0 (Minifed)" class="button ss-download">Download jPanelMenu</a></p>
<p>Download the <a href="../jquery.jpanelmenu.js" title="">unminifed version</a>.</p>
<p>Or <a href="https://github.com/acolangelo/jPanelMenu" title="Github | jPanelMenu">view the project on Github</a></p>
</div>
Expand Down Expand Up @@ -178,6 +178,16 @@ <h3><a href="#options-animated">animated</a></h3>
</div>
</div>

<div class="spec" id="options-closeOnContentClick">
<h3><a href="#options-closeOnContentClick">closeOnContentClick</a></h3>
<p>A boolean value specifying whether or not the menu should be closed when clicking on the panel content.</p>
<div class="details">
<p><strong>Data Type:</strong> <code>boolean</code></p>
<p><strong>Accepted Values:</strong> <code>true</code> or <code>false</code></p>
<p><strong>Default Value:</strong> <code>true</code></p>
</div>
</div>

<div class="spec" id="options-keyboardShortcuts">
<h3><a href="#options-keyboardShortcuts">keyboardShortcuts</a></h3>
<p>An option that allows you to control if keyboard shortcuts are enabled, and if they are, which keys do what.</p>
Expand Down Expand Up @@ -554,6 +564,14 @@ <h2 id="license"><a href="#license">License</a></h2>
<h2 id="changelog"><a href="#changelog">Changelog</a></h2>

<dl>
<dt id="changelog-1.3.0"><a href="#changelog-1.3.0">1.3.0</a></dt>
<dd>
<p><time>February 4th, 2013</time></p>
<ul>
<li>Added new option: <code><a href="#options-closeOnContentClick" title="jPanelMenu | Options | closeOnContentClick">closeOnContentClick</a></code></li>
</ul>
</dd>

<dt id="changelog-1.2.0"><a href="#changelog-1.2.0">1.2.0</a></dt>
<dd>
<p><time>February 3rd, 2013</time></p>
Expand Down
2 changes: 1 addition & 1 deletion docs/js/example-jRespond.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/js/lib/jquery.jpanelmenu.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.

11 changes: 7 additions & 4 deletions jquery.jpanelmenu.js
@@ -1,6 +1,6 @@
/**
*
* jPanelMenu 1.2.0 (http://jpanelmenu.com)
* jPanelMenu 1.3.0 (http://jpanelmenu.com)
* By Anthony Colangelo (http://acolangelo.com)
*
* */
Expand All @@ -18,6 +18,7 @@
direction: 'left',
openPosition: '250px',
animated: true,
closeOnContentClick: true,

keyboardShortcuts: [
{
Expand Down Expand Up @@ -434,6 +435,8 @@
},

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

$(document).on('click',jP.panel,function(e){
if ( jP.menuIsOpen() ) jP.closeMenu(jP.options.animated);
});
Expand All @@ -444,6 +447,8 @@
},

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

$(document).off('click',jP.panel,null);
$(document).off('touchend',jP.panel,null);
},
Expand Down Expand Up @@ -499,9 +504,7 @@
jP.setMenuState(false);
jP.setupMarkup();

jP.setMenuStyle({
width: jP.options.openPosition
});
jP.setMenuStyle({ width: jP.options.openPosition });

jP.checkFixedChildren();
jP.setPositionUnits();
Expand Down
4 changes: 2 additions & 2 deletions jquery.jpanelmenu.min.js

Large diffs are not rendered by default.

0 comments on commit a715b37

Please sign in to comment.