2016-01-13 119 views
0

我使用下面的代码也找到代码here。请你帮忙。无法显示悬停在悬停td元素的表

<table> 
    <tbody> 
    <tr class="myrow1">       
    <td class="cpCode"> 
    <span rel="replace">Need PopOver</span> 
    </td> 
    </tr> 

jQuery(function($) { 
     $('[rel=replace]').popover({trigger: 'hover', 
       placement : 'top', 
       html: 'true',        
       content :'Hello'        
        });      
}); 
+0

能否请您解释一下吧更多? – Codeone

+0

我认为你提供了错误的小提琴 – Siddharth

+1

你好Siddharth,请检查现在更新小提琴 – Adi

回答

0

我看到了你的小提琴,你错过了引导/ jQuery的文件,这里是相同fiddle,它是工作的罚款

$(document).ready(function(){ 
    $('[rel="replace"]').popover({ 
      trigger: 'hover', 
      placement : 'bottom', 
      html: 'true',        
      content :'Hello' 
    }); 
}); 
+0

你好Siddharth,我能搞到小提琴这是我的小提琴[链接](https://jsfiddle.net/atotadhm/bvb3L851/) 它工作正常在提琴但不在代码中。我在其他页面使用popover,它工作的很好。下面是我如何创建td。 $(this).append(''+ key +''); td及其文本显示fine.but不弹出 – Adi

+2

检查此链接为动态元素添加弹出窗口http://stackoverflow.com/questions/16990573/how-to-bind-bootstrap-popover-on-dynamic-elements –

+1

我为此做了一个[fiddle](https://jsfiddle.net/tr02bL5c/),你需要使用'popover'的'selector'选项作为@NarendraCM提到的 – Siddharth