mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
panel handlers
This commit is contained in:
15
js/framework/handlers/panel-handler.js
Normal file
15
js/framework/handlers/panel-handler.js
Normal file
@ -0,0 +1,15 @@
|
||||
(function(window, document, ion) {
|
||||
|
||||
function click(e) {
|
||||
if(e.target.dataset.togglePanel) {
|
||||
ion.Panel.toggle(e.target.dataset.togglePanel);
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('click', click, false);
|
||||
window.addEventListener('touchend', click, false);
|
||||
|
||||
})(this, document, ion = this.ion || {});
|
||||
Reference in New Issue
Block a user