Prevent links from opening with Sencha Touch/ExtJS
This can be useful if you want all links on your page to open differently (like in PhoneGap).
Ext.each(Ext.query('a'), function(el) {
el = Ext.get(el);
el.on('click', function(e) {
e.preventDefault();
console.log('clicked', el.getAttribute('href'));
});
});
Written by Robert Dougan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Links
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#