Thank you. Any idea how I could attach to regular javascript call like " x.value='something' "?
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