Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Prevents panels without IDs from being triggered by unrelated links.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilto committed Jan 10, 2013
1 parent 42477a5 commit 9c1ed14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/widgets/panel.js
Expand Up @@ -157,7 +157,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
var self = this;

this._page.on( "click.panel" , "a", function( e ) {
if( this.href.split( "#" )[ 1 ] === self._panelID ){
if( this.href.split( "#" )[ 1 ] === self._panelID && self._panelID !== undefined ){
e.preventDefault();
var $link = $( this );
$link.addClass( $.mobile.activeBtnClass );
Expand Down

0 comments on commit 9c1ed14

Please sign in to comment.