Jump to content

Digger

Members
  • Posts

    13
  • Joined

  • Last visited

Community Answers

  1. Digger's post in Passing array result from php to jquery after ajax.post was marked as the answer   
    Sorted it
     
    Toast.fire(JSON.parse(data));  
  2. Digger's post in PHP Jquery & datatables help rquired was marked as the answer   
    Thank you so much, i think it was a case of me going code blind, i cant believe i didn't think about that.
    I've modified your suggestion a bit, i've put it in a javascript file and included it
    var Toast = Swal.mixin({ toast: true, position: 'top-end', showConfirmButton: false, timer: 5000 }); function loadDataTable(div,urlLink){ $(div).html("<div id='loader'><center><i class='fas fa-spinner fa-3x fa-spin -auto m-5'></i></center></div>"); $("#requests-container").load(urlLink, function(){ $("#project-requests").DataTable({ "order": [[0, "desc"]], "responsive": true, "lengthChange": true, "autoWidth": false, "pageLength": 25, "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], "buttons": ["copy", "pdf", "print", "colvis"] }).buttons().container().appendTo("#project-requests_wrapper .col-md-6:eq(0)"); }); } So now the call is
    loadDataTable("#requests-container","'.DIR.'admin/dashboard/requests"); Basically this so so i can trigger it from anywhere and for anything on the site
     
    Thanks again for your help
  3. Digger's post in Links not working on dynamic page was marked as the answer   
    $(document).ready(function(){ $( "#nav-home").load("'.DIR.'admin/client/list", function() { $(".dropdown-item").on("click", function(){ alert("clicked"); }); }); }); That worked
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.