Calculate number of inputs where name starts with name^ and input value is>0
I have many inputs with name totalsum1,totalsum2,totalsum3 etc. I need to calculate number of inputs where name starts with "totalsum" and value is >0. I need to send result to another input with id="#rowtotal".
My code:
$("#rowtotal").val(($("input[name^=totalsum]").val>0).size());
It's not working. Thank's for your help in advance.
Best Regards
Rafał Koszyk