When I open the popup it animates if I use the settimout as below, since Im loading images and text from my database I guess it needs 300milliseconds to load properly.
But when I close it, is is animating when I test it on my computer but not when I close it on my iPhone 6s? Then it is just closing it and you can’t see the animation.
var dagensAnnonsPopup2 = app.popup.create({
content: '<div class="popup popup-swipe-to-close popuppen">'+
'<div class="popuppen-header headeroutside"><div class="popuppen-headline">Dagens Erbjudande</div><i class="f7-icons color-gray size-18 popup-close popuppen-close">close_round</i></div>'+
'<div class="popuppen-inner">'+
'<div class="popuppen-header headerinside"><div class="popuppen-headline">Dagens Erbjudande</div><i class="f7-icons color-gray size-18 popup-close popuppen-close">close_round</i></div>'+
'<div class="block popuppen-block">'+
'<div class="instadiv2">'+
'<img src=https://xxx.se/admin/user_images/xxx/annonser/'+theimage2+' class="instaimage instashadow " />'+
'</div>'+
head +
tex +
adr +
thelink +
'</div>'+
'</div>'+
'</div>',
// Events
on: {
open: function (popup) {
console.log('Popup open');
},
opened: function (popup) {
console.log('Popup opened');
},
}
});
setTimeout(function() {
dagensAnnonsPopup2.open();
},300);
}
So how can I slow down the closing some milliseconds? I guess that would solve the problem, since I think it is trying to animate the closing too fast?
Thanks!