When the user has changed the value with the keyboard, it will fire the change event when it loses focus. (I think that's right..)
On Aug 3, 3:16 am, Jack Killpatrick <[EMAIL PROTECTED]> wrote: > Hi, wondering if anyone knows why this might be happening: > > I've attached a .change event to a set of <select> boxes: > > $('#ml_cartItems [EMAIL PROTECTED]').change(function() { > var productID = this.id.split('_')[1]; > MLStore.changeItemQty( productID, $(this).val() ); > }); > > The change event fires fine when the user changes the select box using > the mouse, but not when the keyboard up/down arrow keys are used. Know why? > > Related question.... the MLStore.changeItemQty() function makes an ajax > call. I don't want a user tooling up and down the select box, causing it > to fire a slew of ajax calls. Any advice on how to handle that > situation? I don't want to use blur, because I want the (eventual) ajax > call to be fired just by changing the select box. I figure I can use a > setTimeout or setInterval, but not sure what the most elegant way would be. > > TIA! > Jack