I have a table. The top row has 2 columns – “header” and “close” button. I can make the entire table “draggable”. How can I make the “header” to be the only element that user can drag in order to move the entire table around?
UPDATED: As tagged, I need to use jQuery. This is what’s not working:
$(tblElement).draggable({ handle: "tdDialogHeader" });
If the solution suggested by Sinetheta doesn’t work for you, that means your table doesn’t have “tHead” tag as its header. jQuery is not great with tables, especially if they are malformed. Replace the “TR” tag of the first row in your table with “tHead” and try the Sinetheta’s code. Should work.