title: How to handle Bootstrap pagination inside ajax call
body: <p>I did bootstrap pagination with some duplicate data (with the help of stack overflow member). Its working fine But In my real application I am getting data from database.For that I am using the following method</p>
  
  <pre><code>function empRoles() {
         $.ajax({
          type: 'POST',
          url: "/Admin/getRolesList",
          data:'{}',
          dataType: 'json',
          success: function (response) {
              console.log(response)
              var roleList = response;
              if (roleList == "") {
                  noData()
              } else {
                  $('#content').html('');
                  for (var i = 0; i &lt; roleList.length; i++) {
                      var table = '&lt;tr  id="' + roleList[i].Id + '"&gt;&lt;td&gt;' + (i + 1) + '&lt;/td&gt;&lt;td class="roleName" id="name' + i + '"&gt;' + roleList[i].name + '&lt;/td&gt;&lt;td&gt;&lt;button  class="btn edit btn-info btn-sm" id="edit' + i + '"&gt;&lt;i class="fa fa-pencil"&gt;&lt;/i&gt;Edit&lt;/button&gt;&lt;button  class="btn update btn-success btn-sm" id="update' + i + '"&gt;&lt;i class="fa fa-floppy-o"&gt;&lt;/i&gt;Update&lt;/button&gt;&lt;button class="btn dlt btn-danger btn-sm" onclick="deleteRow(this)" data-dismiss="modal" id="dlt' + i + '"&gt;&lt;i class="fa fa-trash-o"&gt;&lt;/i&gt;Delete&lt;/button&gt;&lt;button class="btn editCancel btn-danger btn-sm" id="editCancel' + i + '" &gt;&lt;i class="fa fa-times"&gt;&lt;/i&gt;Cancel&lt;/button&gt;&lt;/td&gt;&lt;tr&gt;';
                      $('#content').append(table);
                      editUpdate();
                  }
              }
  
          },
          failure: function (response) {
              noData()
          }
      });
  }
  </code></pre>
  
  <p>Here is my duplicate file without ajax call<br>
  <a href="https://jsfiddle.net/gjohq4tu/7/" rel="nofollow noreferrer">https://jsfiddle.net/gjohq4tu/7/</a></p>
  
  <p>I commented ajax code in my fiddle.Please guys help me, how can I implement bootstrap pagination inside of an ajax call.</p>