Binding An Event In Offline.js
I'm trying to get offline.js working together with toastr alerts. My limited JS knowledge is holding me back but hoping some can shed some light on this. What I want to happen When
Solution 1:
you have not attached up event as per the documentation.
function checkifbackonline(evt){
var backonlinemessage = "re-connected successfully";
toastr.info(backonlinemessage);
}
Offline.on("up", checkifbackonline);
when up is triggerd it will call checkifbackonline function. If you want to remove the event binding then call Offline.off("up");
Post a Comment for "Binding An Event In Offline.js"