-
Notifications
You must be signed in to change notification settings - Fork 587
Open
Description
jQTouch already stops taps when animating from one page to another, but it doesn't when tapping an element that triggers an ajax page load, so tapping such element twice results in broken element bindings and ugly animations.
To fix this, read below, but first apply the fix for #524.
Fix
// jqt.js
{
name: "external",
isSupported: function(e, params) {
return true;
},
fn: function(e, params) {
var animation;
animation = getAnimation(params.$el);
$body.addClass("external-loading"); // FIX
params.$el.addClass("loading active");
showPageByHref(params.$el.attr("href"), {
animation: animation,
callback: function() {
$body.removeClass("external-loading"); // FIX
params.$el.removeClass("loading");
return setTimeout(function() {
return params.$el.removeClass('active');
}, 250);
},
$referrer: params.$el
});
return false;
}
}// _core.scss - inside the #jqt selector
// Make sure nothing is tappable when loading external pages
&.external-loading:after {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 10;
}Metadata
Metadata
Assignees
Labels
No labels