Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function call_pop_up(loket,no_antrian){
- swal({
- title: '<span style="font-size:50px">No Antrian</span>',
- html: '<span style="color:red;font-size:130px">'+no_antrian+' <br/> Loket '+loket+'</span>',
- showCancelButton: false,
- showConfirmButton: false,
- animation: false
- });
- }
- function call_ajax_antrian(){
- $.ajax({
- url: 'ajax/ajax_antrian',
- type: 'POST',
- success: function(data) {
- $("#ajax_data").html(data);
- }
- });
- }
- call_ajax_antrian();
- setInterval(function() {
- call_ajax_antrian();
- $.ajax({
- url: 'ajax/jam',
- type: 'POST',
- success: function(data_jam) {
- $("#tgl").html(data_jam);
- }
- });
- }, 2000);
- //Start Pop Up
- var antrian_current;
- setInterval(function() {
- $.ajax({
- url: 'ajax/ajax_pop_up',
- type: 'POST',
- success: function(mydata) {
- if(mydata!="no_data"){
- var arr = mydata.split('%%$$%%');
- if(antrian_current==""){
- antrian_current = mydata;
- call_pop_up(arr[0],arr[1]);
- }
- else {
- if(mydata!=antrian_current){
- call_pop_up(arr[0],arr[1]);
- }
- }
- }
- else {
- swal.close();
- }
- }
- });
- }, 2000);
- //End Pop Up
Advertisement
Add Comment
Please, Sign In to add comment