I'm not sure I understand exactly what you mean but I can answer the question in the title of your thread :)
instead of using the 'blur' event use the 'change' jquery event (analogous to onChange() traditional js) http://docs.jquery.com/Events/change -Alex On Sep 16, 11:08 pm, bombaru <[EMAIL PROTECTED]> wrote: > I've got an input box and am displaying a form button on focus... then > hiding the form button on blur. Ideally, I want to display the form > button on focus, but only hide the button if the original contents of > the input box have not changed (put another way... persist the form > button if the quantity has changed). Can someone help steer me in the > right direction? This is for a cart checkout page that I am working > on and will provide users a way to update the quantity of an item in > their cart. Here's the code I am using: > > // flag the document as OK for JS > $('html').removeClass('nojs'); > > //show Update buttons only as necessary > $('input.qty').each(function() > { > var $qButton = $ > (this).siblings('[EMAIL PROTECTED]"image"]'); > > $(this).focus(function() > { > $qButton.fadeIn(200); > }); > > $(this).blur(function() > { > $qButton.fadeOut(200); > }); > }); > > As you can probably tell, this approach is less than ideal and > provides the user no time to click the update button after a change > has been made. I can increase the fadeOut duration, but that still > blows. > > Thanks for any help you might be able to provide me.