Created
January 25, 2015 23:56
-
-
Save auniverseaway/6fcd237c4c8d186e5649 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.level1>.x-panel-bwrap>.x-panel-tbar, .level2>.x-panel-bwrap>.x-panel-tbar, .level3>.x-panel-bwrap>.x-panel-tbar').click(function(){ | |
parent = this.parentNode; | |
body = $(parent).children('.x-panel-body'); | |
xpanel = $(body).children('.x-panel'); | |
// I always specifically open and close because I've seen some issues with toggleClass. - CM | |
if($(this).hasClass('open')) { | |
$(this).removeClass('open'); | |
$(xpanel).removeClass('open'); | |
} else { | |
$(this).addClass('open'); | |
$(xpanel).addClass('open'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment