popover on hover not working on second page of datatable

后端 未结 1 1851
梦谈多话
梦谈多话 2020-12-16 17:45

I added content of one column dynamically...

 for (var i = 0; i < data.length; i++) {
   data.referred_by=\'

        
相关标签:
1条回答
  • 2020-12-16 18:08

    You need to reinitialize the popovers each time the dataTable is redrawn. $('[data-toggle="popover"]').popover() will only initialize those popovers visible at the time the code is executed, not the popovers in for example page #2. Execute popover() in the drawCallback() callback instead :

    $('#datatable4').dataTable({
      ...
      drawCallback: function() {
        $('[data-toggle="popover"]').popover();
      }  
    })
    
    0 讨论(0)
提交回复
热议问题