Override method inside jquery widget
<p>I'm trying to override a method inside a jquery widget. The method can be found on line 122 at <a href="https://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/jquery/validation.js" rel="nofollow">https://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/jquery/validation.js</a></p>

<p>Id like to alter the html output on line 141</p>

<p>I've tried adding the following to my custom js class without success. If anybody could explain how to do this, id greatly appreciate it. </p>

<pre><code>(function($) {    
$.widget( "ui.tapestryFieldEventManager", {
    showValidationMessage : function(message) {
        var field = this.element;
        var form = field.closest('form');

        this.options.validationError = true;
        form.formEventManager("setValidationError", true);

        field.addClass("t-error");

        this.getLabel() &amp;&amp; this.getLabel().addClass("t-error");

        var icon = this.getIcon();

        if (icon) icon.show();
        alert("here");
        var id = field.attr('id')+"\\:errorpopup";
        if($("#"+id).size()==0) //if the errorpopup isn't on the page yet, we create it
            field.after("&lt;div id='"+field.attr('id')+":errorpopup' class='tjq-error-popup test'/&gt;");
        Tapestry.ErrorPopup.show($("#"+id),"&lt;span&gt;"+message+"&lt;/span&gt;");

    }
});
})(jQuery);
</code></pre>
