How can I execute this function only once and when the browser tab/window is active ?
$(function(){
noty({text:'Here is my text',type:'error'});
return false;
});
If I use:
$(window).one('focus', function(){
The function is executed but only if I leave the tab and come back again.
Any ideas ?
Many thanks