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); } }); });
Comments
Post a Comment