/* 
 * Copyright (c) 2019 Earworks.
 * Codeigniter Project Template Modification
 * Please contact our email for more information :
 *  contact@earworks.co.id
 */

var viewonroad = function(){
    var the = null;
    var wrapper = $('.tableantrian');
    return {
        init: function(){
            the = this;
            setInterval(the.refreshview, 5000);
        },
        refreshview: function(){
            $.ajax({
                'url': refreshurl,
                'type' : 'GET',
                'dataType': 'html',
                'cache': false,
                'success': function(res){
                    wrapper.empty().html(res);
                    console.log(res);
                }
            });
        }
    };
}();
$(document).ready(function(){
    viewonroad.init();
});
