mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 07:41:51 +08:00
starting simple
This commit is contained in:
23
ext/simple/init.js
Normal file
23
ext/simple/init.js
Normal file
@ -0,0 +1,23 @@
|
||||
(function(window, document, ionic) {
|
||||
|
||||
// add tap events to links
|
||||
function onLinkTap(e) {
|
||||
window.location = this.href;
|
||||
return false;
|
||||
}
|
||||
function addTapToLinks() {
|
||||
for(var x = 0; x < document.links.length; x++) {
|
||||
if(!document.links[x]._hasTap) {
|
||||
ionic.on('tap', onLinkTap, document.links[x]);
|
||||
document.links[x]._hasTap = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ionic.ResetTap = function() {
|
||||
addTapToLinks()
|
||||
};
|
||||
|
||||
ionic.ResetTap();
|
||||
|
||||
})(this, document, ionic);
|
||||
Reference in New Issue
Block a user