removing a jquery function from a class
<p>I have a function called colors attached to an div called .viewShow. What I want to do is remove the function from the element not remove the element. I can't seem to find anything on it. Can someone please point me in the right direction on how to remove the color function from .viewShow?</p>

<pre><code>if ($.showRestart == 'no') {
    $('.viewShow').colors();
    $.showRestart = 'yes';
} else {
    $('.viewShow');  // I want to remove colors ? ? ? ? ? ? ? ;
    $.showRestart = 'no';
}
</code></pre>

<p>I need to add some information to make the picture clearer. I have five divs called .panels they are all children of .viewShow. What I have been practising is using the extend function in the color obj (I believe). I am getting .panels to change colors, from what I can understand I am merging the two objects below and it works. What I need to understand is once the function has complete it works if I click again I want the .colors() to be destroyed. The css color is only a test I am adding other functionality.</p>

<pre><code>     $(function(b){
            b.fn.extend({
                colors:function(d){
                    d=b.extend({                          
                        panelClass:".panel"
                    },d);
                    return this.each(function(){
                        var a=d;
                        b(this);
                        $(a.panelClass).css("background-color","red");
                    })
                }
            })
        });
</code></pre>
