Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery.fn.pushNotification = function(message, type ,speed){
- var pushBox = "push-notification",
- pushNotification = "<div class='"+ pushBox +"'></div>";
- $(pushNotification).appendTo( $( 'header' ) );
- $(this).click(function(){
- if (type == "alert"){
- $("."+pushBox).css("background-color", "#d15e3e");
- $("."+pushBox).text(message);
- } else if (type == "succes"){
- $("."+pushBox).css("background-color", "#9ad362");
- $("."+pushBox).text(message);
- } else if (type == "info"){
- $("."+pushBox).css("background-color", "#195a89");
- $("."+pushBox).text(message);
- }
- $("."+pushBox).animate({ right: "-10px" }, speed );
- setTimeout(function(){
- $("."+pushBox).animate({ right: "-300px" }, speed );
- }, 2000);
- });
- }
- $(".sI5").pushNotification("Presentatie verwijderd", "alert", 1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement