Remove static notifications and load them via ajax

This commit is contained in:
Karsten Heiken
2011-08-01 14:50:31 +02:00
parent 51cd469e39
commit 8583df746f
5 changed files with 123 additions and 15 deletions

View File

@@ -1,3 +1,10 @@
function get_notifications() {
$('#notifications').load(SITE_URL + 'ajax/get_notifications',
function() {
$('#notifications').slideDown();
});
}
$(document).ready(function() {
//When page loads...
@@ -17,4 +24,7 @@ $(document).ready(function() {
return false;
});
});
$('#notifications').hide();
setInterval(get_notifications(), '5000');
});