You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I been looking for a Notify that can attached itself to an object and this works brilliantly
in my header.php file, used for all my screens, I have a small "Bull Horn" symbol that I use to display the number of messages waiting to be displayed, similar to Facebooks notifications. I use the following code:
function checkForNotifications() {
$.getJSON("/server_side/scripts/ajax_retrieveNumberOfNotificationsForStaffID.php?staffID=", function (data) {
$.each(data.theData, function (i, data) {
if (data.noOfMessages != 0 ) {
$(".showNotifications").notify(data.noOfMessages, {position: "right", className: "info"});
}
});
});
}
setInterval(checkForNotifications,2000);
and it works great constantly checks great,works sweet as a nut..
Click on the Bullhorn and I use Nofify again to display the individual messages waiting. However, the other screens still say there are messages, because the Notify is only displayed is there are any. What I want to use, is an else to make it disappear on the next interval. I've tried various methods, but it either stayes there or the messages I want to see are also deleted/removed from the screen.
If anyone has any ideas that would be great.
However, because this is used on all screens - the other screens show the
The text was updated successfully, but these errors were encountered:
Hi, hopefully someone can help
I been looking for a Notify that can attached itself to an object and this works brilliantly
in my header.php file, used for all my screens, I have a small "Bull Horn" symbol that I use to display the number of messages waiting to be displayed, similar to Facebooks notifications. I use the following code:
I then set up the rest with:
$.notify.defaults({autoHide: false, arrowSize: 10}) ;
function checkForNotifications() {
$.getJSON("/server_side/scripts/ajax_retrieveNumberOfNotificationsForStaffID.php?staffID=", function (data) {
$.each(data.theData, function (i, data) {
if (data.noOfMessages != 0 ) {
$(".showNotifications").notify(data.noOfMessages, {position: "right", className: "info"});
}
});
});
}
setInterval(checkForNotifications,2000);
and it works great constantly checks great,works sweet as a nut..
Click on the Bullhorn and I use Nofify again to display the individual messages waiting. However, the other screens still say there are messages, because the Notify is only displayed is there are any. What I want to use, is an else to make it disappear on the next interval. I've tried various methods, but it either stayes there or the messages I want to see are also deleted/removed from the screen.
If anyone has any ideas that would be great.
However, because this is used on all screens - the other screens show the
The text was updated successfully, but these errors were encountered: