jquery - Displaying bootstrap modal window as browser notification -


i have developed reminder application , want show reminder user in form of notification/popup/modal-window consisting form, irrespective of tab user using in browser.

as response notification, user clicks acknowledge or snooze notification closes modal, in facebook notifications.

ps: alternate idea show reminder user form , implement snooze button? highly appreciate.

<div class="modal fade" id="ordernotifications-modal" tabindex="-1" role="dialog" aria-labelledby="ordernotifications-modal">      <div class="modal-dialog modal-lg">        <div class="modal-content">            <div class="modal-header">                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>                <h2 class="modal-title pcconv-title">new order notificaitons</h2>            </div>            <div class="modal-body notifications-modal-body">                <div class="onotify-body">                 </div>            </div>         </div>      </div>    </div> 

jquery:

$.ajax({         type     : "get",         url      : "{!! url::to('your-route') !!}",         success  : function(data) {           if (data > 0){             $.titlealert("title!", {                 requireblur:false,                 stoponfocus:false,                 duration:4000,                 interval:700             });             $('#ordernotifications-modal').modal('show');             // $('#playsound')[0].play();             $( ".onotify-body" ).load( "{!! url::to('your-route') !!}");           }         }       }); 

Comments