Domanda

Is there a jquery table element widget which allows you to remove certain columns by clicking an 'x' icon? I'd previously used a custom tab interface I found online only to find out after I'd implemented most everything that I could've used jquery tabs (sigh) and would like to avoid similar situation.

Looking for something similar to this.

È stato utile?

Soluzione

You can do this quite simply yourself. If you search on stackoverflow for "jquery remove table column" you will find many answers. Here is a "plugin": http://jquery-howto.blogspot.se/2009/05/remove-nth-table-column-jquery-plugin.html

Using this function, create your x-icon element with id="x_element" and add some javascript:

$('#x_element').click({
  $('#table_id').removeCol(2);
});
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top