Showing posts with label changeevent. Show all posts
Showing posts with label changeevent. Show all posts

Wednesday, July 3, 2013

jQuery UI: Change Event Data For Progressbars

The progressbar widget, any time the value changes, will trigger a change event. This change in value happens when the value() method is used, or when the value option is set. Both produce the same result. But the progressbar doesn't automatically trigger the change event just because the value is updated. It has to actually change, to a different number. This is accomplished by storing the old value internally, and comparing it to the new value, and only when there is a difference does the change event trigger. What would be really useful is to include both the old and new values of the progressbar in the event data.