Variable used in function name
<p>I'm making a helper function that, amongst other things adds or removes a class. The function needs to be able to do either as there doesn't seem any point in making two functions with the only difference being one adds a class the other removes it. So:</p>

<pre><code>function kalf_addRow( type, action ) {
    found = $("."+type).not(".row-vis").first();
    found.slideDown();
    $(found).[INSERT 'action' IN HERE]Class("row-vis");     
}
</code></pre>

<p>I would pass it either "add" or "remove" as the "action" parameter and then need it inserted where shown. I would need to do similar for the slideDown too but it's basically the same problem.</p>
