0

I am trying to use bootstrap popup for dynamically generated table. In the table there is a column name users and it has number of users for each item.

Eg: table structure

item name | adress | users 
bla..blaa | bla..  |   4 

Now I need to display a popup with user information when click on 4.

User column HTML is something like this :

<a href='javascript:void(0);' data-rel='popover' title='' data-content='Heads up! This alert needs your attention, but its not super important.' class='badge badge-inverse popup'>4</a>

This is how I tried it in query:

$('#view_table').find('[data-rel=popover]').popover({html:true});

But When I click on 4 under user column its not trigger the pupover. Mean time I checked the same HTML outside the table and I can get it to work.

Any idea to it doesn't work inside table.

Hope somebody may help me out.

McVenco
  • 1,011
  • 1
  • 17
  • 30
user3733831
  • 2,886
  • 9
  • 36
  • 68

1 Answers1

0

Are you writing your

$('#view_table').find('[data-rel=popover]').popover({html:true});

code after, binding the Table's HTML to the DOM, or before hand.

Try writing the above code, after the Table has been added to the DOM