We have two input boxes..both having jquery ui spinner..depending on value of one spinner value of other spinner should change.
For e.g. First input box have value "10" Second input box has value "2"..if we increment Second input box once the value of first increments by 4 so new value of first input box will become "14" & if we decrement the value once then value of first input box decrements it will become "6"
Help how we can implement this
You can use spinner
spin
event and useui
to get current changed value and Since, the original value is still not changed in this event you can use$(this).val()
to get the old value.See the Fiddle