Josh,

>I was just wondering, should a val() call invoke a change event?  If
>not, is there a good way to emulate this behavior.

You could overwrite the default behavior:

$.fn.extend({
        val: function( val ) {
                return val == undefined ?
                        ( this.length ? this[0].value : null ) :
                        this.attr( "value", val ).trigger("change");
        }
});

I just append the .trigger("change") to the original code. This would fire
off the onchange event after the value has been updated.

-Dan

Reply via email to