Finding and removing specific elements using css classes
<p>I'm far from a JavaScript expert but I'm trying to migrate some mootools code to jQuery but am struggling!</p>

<p>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.</p>

<p>This is my mootools code:</p>

<pre><code>function remove_hidden_elements() {
    var myElements = $$('.table-row');
    myElements.each(function (item, index) {
        var vis = item.getStyle('display');
        if (vis == 'none') {
            item.dispose();
        }
    });
}
</code></pre>

<p>Please can someone point me in the right direction for achieving this within jQuery?</p>

<p>Many thanks in advance.</p>
