     <script src="https://cdn.datatables.net/1.11.0/js/jquery.dataTables.min.js"></script>
     <script src="https://cdn.datatables.net/1.11.0/js/dataTables.bootstrap5.min.js"></script>
     <script type="text/javascript">
        $(document).ready(function()
        {
            $("#datatable").DataTable({
                    
            });

            var toastTrigger = document.getElementById('liveToastBtn')
            var toastLiveExample = document.getElementById('liveToast')
            if (toastTrigger) {
              toastTrigger.addEventListener('click', function () {
                var toast = new bootstrap.Toast(toastLiveExample)

                toast.show()
              })
            }
            var toastTrigger = document.querySelectorAll('[data-bs-autohide="true"]');
            toastTrigger.forEach(function(e){
              var toast = new bootstrap.Toast(e)
              toast.show()
            })

        });

        $(window).on("load", function () {
            <?php if(isset($_GET['stat'])){ ?>
            setTimeout(
              function() 
              {
                $("#liveToastBtn").click();
              }, 2000);
            <?php } ?>


        });

        function todetail(id){
            $.get('<?php echo BASEURL; ?>data/data.php?data=manlengkungDetail&id=' + id, function( data ) { 
                $('#edit-id').val(id);
                $('#edit-tahundebit').val(data.tahun_debit).change();
                $('#edit-tipepos').val(data.id_lokasi).change().attr("disabled", true);
                $('#edit-curvea').val(data.nilai_a);
                $('#edit-curveb').val(data.nilai_b);
                $('#edit-curvec').val(data.nilai_c);
            },'json'); 
        } 
     </script>