Spinner control Spin event | Keep on firing again and again

Spinner control Spin event | Keep on firing again and again

Hi , 

I am trying to use Spinner control and wants to control the next value that should be set in textbox if user either directly enter or use step-up or step-down buttons. 

for this i am listening to "Spin" event and assigning a function to this event. in this event i am trying to check if next spin value is one those that i do not want then i increase the value and set it using "value(value)" function.

what happening is this event keeps on firing even if i remove all my code from this event , i tried to return false to cancel the event but  in vain.
code is like 
 $('#_SpinnerTextBox').spinner({
        spin: function (event, ui) {
         return  GetNextAvailableValue(event, ui);
        }
    });

function GetNextAvailableFloor(event, ui)
{
 // this function keeps on getting called.
}

Please help asap, as this is very urgent development requirement.

thank you 
Dheeraj Kumar