0

I am using below code also find the code here .Could you please help on this.

<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'                             
                  });                     
 });
Adi
  • 119
  • 1
  • 1
  • 10
  • can you please explain more about it? – Codeone Jan 13 '16 at 08:17
  • i think you have provided the wrong fiddle – Siddharth Jan 13 '16 at 08:18
  • 1
    Hello Siddharth, Please check now updated the fiddle – Adi Jan 13 '16 at 08:23
  • man you can not see the popover because it is `top` aligned and it is getting hidden, change it to `bottom` and see the magic – Siddharth Jan 13 '16 at 08:29
  • 1
    It is because you didn't add JQuery in it. Check https://jsfiddle.net/1qnpnwao/1/. It's working – ketan Jan 13 '16 at 08:30
  • I am able to get in fiddle this is my fidddle link It works fine in fiddle but not in code. I have used popover in other pages it is working well.Below is how I am creating the td . $(this).append(' ' + key + ''); td and its text are displaying fine.but not popover – Adi Jan 13 '16 at 08:57

1 Answers1

0

I saw your fiddle, you missed bootstrap/jquery files, here is the same fiddle and it is working fine

$(document).ready(function(){
    $('[rel="replace"]').popover({
          trigger: 'hover',
          placement : 'bottom', 
          html: 'true',                            
          content :'Hello' 
    });   
});
Siddharth
  • 859
  • 8
  • 16
  • Hello Siddharth, I am able to get in fiddle this is my fidddle [link](https://jsfiddle.net/atotadhm/bvb3L851/) It works fine in fiddle but not in code. I have used popover in other pages it is working well.Below is how I am creating the td . $(this).append(' ' + key + ''); td and its text are displaying fine.but not popover – Adi Jan 13 '16 at 08:44
  • 2
    Check this link to add popover for dynamic elements http://stackoverflow.com/questions/16990573/how-to-bind-bootstrap-popover-on-dynamic-elements – Narendra CM Jan 13 '16 at 08:57
  • 1
    I did a [fiddle](https://jsfiddle.net/tr02bL5c/) for this, you need to use `selector` option of `popover` as @NarendraCM mentioned – Siddharth Jan 13 '16 at 09:06
  • Awsome Naendra CM and Siddharth. Working Now! Great. – Adi Jan 13 '16 at 09:26