Share Pastebin
Guest
Public paste!

Little dynamic form function

By: a guest | Mar 22nd, 2010 | Syntax: JavaScript | Size: 0.27 KB | Hits: 70 | Expires: Never
Copy text to clipboard
  1. // After inserting the table
  2. $("td").click(function(){
  3.                                 var text = $(this).text();
  4.                                
  5.                                 $(this).before("<td><form action=\"\" method=\"\"><input type=\"text\"/ value=\"" + text + "\"><input type=\"submit\"/></form></td>");
  6.                                
  7.                                 $(this).remove();
  8.                                
  9.                         });