kudago / smart-app-banner

Lightweight smart app banner with no jquery requirement
MIT License
526 stars 250 forks source link

onInstall and onClose events #94

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi. I'm trying to redirect the user to the app store or open the app if the app is installed. I use a setTimeout in order to do that. Solution described in this link https://stackoverflow.com/questions/13044805/how-to-check-if-an-app-is-installed-from-a-web-page-on-an-iphone I see that in the jquery plug-in there are 2 events. onInstalll and onClose. Are these events included in the configuration of smart-app-banner? It seems that they are not triggered.

Thanks

daGUY commented 6 years ago

It doesn't look like there are any exposed events to hook into, unfortunately. However, at least for closing the smart banner, you can just attach your own click event:

$(".smartbanner-close").on("click", function () {
    // whatever you want to happen when the banner is closed
});