title: When Button clicked, show Popover-Bootstrap and check checkbox is checked?
body: <p>I'm using Popover Bootstrap to show error or alert to users when them click button "Delete".</p>
  
  <ul>
  <li>If users doesn't click checkbox and click button => Popover show error : "You should choose some records !"</li>
  <li>If Users click checkbox and click button => Popover show alert :"Are you sure ?"</li>
  </ul>
  
  <p>and i will call ajax to delete this records.</p>
  
  <p>My code as :</p>
  
  <pre><code>&lt;script&gt;
  
  $(document).ready(function(){
  if('#btn-delete').click(function(){
  var isChecked = $('#ckbox').attr('checked') ? true : false;
  if(isChecked==false)
  {
  $(this).popover({
  title:'Alert',
  content:'You should choose some records !',
  html:true,
  trigger:'focus'
  return false;
  })
  else if(isChecked==true)
  {
  $(this).popover({
  title:'Alert',
  content:'Are you sure ?',
  html:true,
  // in here , i want to add button in popover like "Ok" , and then call AJAX 
  }
  }
  })
      });
  
  
  &lt;/script&gt;
  
  &lt;html&gt;
  &lt;body&gt;
  &lt;div class="row"&gt;
  &lt;button type="button" id="btn-delete"&gt;Delete&lt;/button&gt;
  
  &lt;/div&gt;
  &lt;table&gt;
  &lt;thead&gt;
  &lt;tr&gt;
  &lt;th&gt;&lt;input type="checkbox" id="checkall"/&gt;&lt;/th&gt;
  &lt;th&gt;ProductId&lt;/th&gt;
  &lt;th&gt;ProductName&lt;/th&gt;
  &lt;th&gt;ProductCat&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;input type="checkbox" id="ckbox"/&gt;&lt;/td&gt;
  &lt;td&gt;1&lt;/td&gt;
  &lt;td&gt;prod001&lt;/td&gt;
  &lt;td&gt;5&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;2&lt;/td&gt;
  &lt;td&gt;prod002&lt;/td&gt;
  &lt;td&gt;4&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;3&lt;/td&gt;
  &lt;td&gt;prod003&lt;/td&gt;
  &lt;td&gt;7&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/tbody&gt;
  
  &lt;/table&gt;
  
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>How can i do that ?</p>