javascript - html table preview using jquery -


i have html table , want make preview of table display in popup on button click, have searched internet , found plugin not appropriate. please guide me how can preview table content using jquery or else?

link have found:

http://projects.erikzaadi.com/jqueryplugins/jquery.printelement/

html table

<table>   <tr>    <th>part</th>    <th>id</th>   </tr>   <tr>     <td>new part</td>     <td>231134</td>   </tr>   <tr>     <td>new part</td>     <td>231134</td>   </tr> </table> 

you can clone table contents on click or hover , make sure clone scales little hover element. here's rough cut jquery ui.

$('table').on('click', function(e){     e.preventdefault();     var clone = $(this).clone();     $( "#popup" ).dialog({         open: function( event, ui ) {             $(this).html(clone);         }     });  }); 

http://jsfiddle.net/hg9nj/


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -