javascript - Showing Popover in a Table element using Codeigniter -


can explain how use popover on table element using codeigniter?

<td> <span id="popover" data-toggle="popover" data-content="<?php echo $userdata[$i]->name; ?>"></span><?php echo custom_echo($userdata[$i]->name,15); ?></td> 

and javascript code is

<script>   $(document).ready(function() {     $("#popover").popover({       html: true,       animation: false,       placement: "bottom"     });   }); </script> 

what not working?

using code, have guessed how output html like:

<table>   <tr>     <td><span id="popover" data-toggle="popover" data-content="user name in popover">user name in span</span></td>   </tr> </table> 

i have added script in onload event:

 $("#popover").popover({                 html: true,                 animation: false,                 placement: "bottom"             }); 

i have included resources:

  • jquery
  • bootstrap.min.js
  • bootstrap.min.css

and works fine, can see in jsfiddle: http://jsfiddle.net/d2k8zzsw/1/


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -