demarches-normaliennes/app/assets/javascripts/channels/notifications.js
2017-04-20 10:35:53 +02:00

23 lines
557 B
JavaScript

//App.messages = App.cable.subscriptions.create('NotificationsChannel', {
// received: function (data) {
// if (window.location.href.indexOf('backoffice') !== -1) {
// $("#notification-alert").html(data['message']);
//
// slideIn_notification_alert();
// }
// }
//});
function slideIn_notification_alert (){
$("#notification-alert").animate({
right: '20px'
}, 250);
setTimeout(slideOut_notification_alert, 3500);
}
function slideOut_notification_alert (){
$("#notification-alert").animate({
right: '-250px'
}, 200);
}