How do I add a function to a specific element type in jQuery?
<p>I can do this</p>

<pre><code>jQuery.fn.validate = function(options) {
    var defaults = {
        validateOPtions1 : '',
        validateOPtions2 : ''
    };

    var settings = $.extend({}, defaults, options);

    return this.each(function() {
        // you validation code goes here
    });
};
</code></pre>

<p>but that will make validate() available for every element. I could do this to any element: $('some selector').validate().</p>

<p>Is there a way I can make this only available to, say, form elements? eg. $('.mySpecialFormClass').validate()?</p>
