[jQuery] Remove rows from tables according to some rules.

2009-08-19 Thread henrikaagaardsoren...@gmail.com

I have a table like this:

  

  
  



  
  



  
  

  
  

  
  



  
  



  
  

  
  

  
  



  
  



  
  



  


To sum it up I have a rows that acts a header for a collection of item
(class="item_collection_begin).

Is there some way to click on a button and then all the items and
their header (item_collection_begin), and their footer
(item_collection_end, this is not mandatory that they have such one)
are all hidden if there is no item in the collection where the cell
(amount) is bigger than zero?

I have got it to work for all the rows with items:
$('#test .amount').filter(function (index) {
return $(this).html() == 0;
}).parent().remove();

But this does not hide item_collection_begin (and perhabs
item_collection_end).


[jQuery] Replace select with it's value.

2009-08-21 Thread henrikaagaardsoren...@gmail.com

Is it possible to run through an entire table and replace all
instances of select with it's value instead?