title: swal function not working in sub view which is loaded using ajax
body: <p><strong><em>I am using Codeigniter</em></strong> </p>
  
  <p>I have loaded a subview using ajax HTML function. in this view, I am using swal(sweetalert) but not working. here is my code.</p>
  
  <blockquote>
    <p>settings_js.php</p>
  </blockquote>
  
  <pre><code>$('#banks').on('click',function (e) {
  //    $('#banks').onclick(function (e) {
  
          e.preventDefault();
  //        alert("hello");
          load_banks();
      })
  
      function load_banks() {
          $.ajax({
              url: 'settings/banks_view',
              type: "POST",
  //            data: oData,
              dataType: "HTML",
              processData: false,
              contentType: false,
              success: function (data) {
  //                console.log(data);
                  $(".content-page").html(data);
  
  //                banks_datatable();
  
              },
              error: function (jqXHR, textStatus, errorThrown) {
                  //console.log(jqXHR.responseText)
                  swal("ERROR!", jqXHR.responseText, 'error');
              }
          })
      }
  </code></pre>
  
  <blockquote>
    <p>settings/banks_view</p>
  </blockquote>
  
  <pre><code>public function banks_view()
      {
          $table = 'banks';
          $this-&gt;load-&gt;model("crud_m");
          $data['records'] = $this-&gt;crud_m-&gt;get_data($table);
          $this-&gt;load-&gt;view("settings/banks_v", $data);
      }
  </code></pre>
  
  <blockquote>
    <p>banks_view</p>
  </blockquote>
  
  <pre><code>$("#bnk_form").submit(function (e) {
          e.preventDefault();
  
  //        alert("psersonal form testing");
  
          var form = document.forms.namedItem("bnk_form");
  
          var oData = new FormData(form);
  
          // ajax adding data to database
          $.ajax({
              url: 'settings/bank_data_save',
              type: "POST",
              data: oData,
              dataType: "JSON",
              processData: false,
              contentType: false,
              success: function (data) {
                  if (data.status == true) {
                      $('#bank-modal').modal('toggle');
                      const toast = swal.mixin({
                          toast: true,
                          position: 'top-end',
                          showConfirmButton: false,
                          timer: 3000
                      });
  
                      toast({
                          type: 'success',
                          title: 'Signed in successfully'
                      })
                  } else {
                      swal("ERROR!", data, "error")
                  }
              },
              error: function (jqXHR, textStatus, errorThrown) {
                  //console.log(jqXHR.responseText)
                  swal("JS ERROR!", jqXHR.responseText, 'error');
  //                alert(jqXHR.responseText);
              }
          });
      })
  </code></pre>
  
  <p>First one code is a file which is loading another view. in this view I am using <strong>swal</strong> function but this function did not work.</p>