"notification for browser"
Bootstrap 3.3.0 Snippet by detain

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <button type="button" class="btn btn-primary" onclick="show()">Notify me!</button> </div> </div>
function show(){ var title = "Socio EcuadorBox" , options = { body: "Tienes una Nueva Venta", icon: "http://bootsnipp.com/img/avatars/80371038613994cd96537912756058cb63fd6adb.jpg" }; if (!("Notification" in window)) { alert("Sorry for this message"); } else if (Notification.permission === "granted") { var n = new Notification(title, options); n.onshow=function(){ setTimeout(n.close.bind(n), 10000); } n.onclick = function () { n.close(); }; } else if (Notification.permission !== 'denied') { Notification.requestPermission(function (permission) { if (permission === "granted") { var n = new Notification(title, options); } }); } }

Related: See More


Questions / Comments: