One more quick thing, is it possible to attach this to the val() of a single input, or am I limited to extending this globally?
On Jun 12, 2:44 pm, "Dan G. Switzer, II" <[EMAIL PROTECTED]> wrote: > 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