Josh,

>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?

Instead of calling the below method "val" call it something else--like
"valChange()" or something. Then just call that new method any time you want
the change event to be triggered.

Also, since you're really only wanting to do this for a single field, you
could also just avoid the plug-in and just do: 

$("#myField").val("new value").trigger("change");

That would trigger the "change" event when you update the value.

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

-Dan

Reply via email to