I'm far from a JavaScript expert but I'm trying to migrate some mootools code to jQuery but am struggling!
I have a web form which contains several tables with a css class of '.table-row'. Upon clicking a button, I'd like to find all the rows which have '.table-row' and if their display property is set to none, I'd like to remove them from the page before submitting.
This is my mootools code:
function remove_hidden_elements() {
var myElements = $$('.table-row');
myElements.each(function (item, index) {
var vis = item.getStyle('display');
if (vis == 'none') {
item.dispose();
}
});
}
Please can someone point me in the right direction for achieving this within jQuery?
Many thanks in advance.