I have this code that shows a warning when it is 30 minutes before the event on the calendar, but I want to show it only once when the user comes to the page (30 minutes in advance). Now it is displayed on every page refresh, as well as in the calendar refresh (within 30 minutes), since it is configured to refresh events after a period of time. How to display this warning only once?
var mili = event.start.getTime() - now.getTime(); if(mili < 1800000 && mili > 0){ $('.alert').dialog({ buttons: [{ text: "OK", click: function() { $( this ).dialog( "close" ); } }] }); }
javascript jquery
jakob
source share