Javascript: Add a class where class
<p>I am working with js and i need to remove one class and add another, in this case visible and invisible(self explanatory css i think), to all elements with the class 'edit'. Is it possible to use a class as a selector for adding a class?</p>

<p>I have tried:</p>

<pre><code>$(function){
    $('#hide').click(function(){
        $('.edit').addClass('visible');
    });
};
</code></pre>

<p>This does not work. Any ideas?  </p>
