Q:

what is the purpose of binding and unbinding the same javascript function?

I know what jquery bind() and unbind() does. But What is the purpose of binding and unbinding the same function using jquery function. In a large code base, I saw binding and binding a function in places. for ex.
$('#someButtonID').unbind('click',functionName)
                  .bind('click',functionName);

What is the need of doing it?

A:

For a single event it is possible to bind many functions. 
So this code:  
$('#someButtonID').unbind('click',funtionName).bind('click',functionName);

makes sure that the function with name functionName is bound to the element only once (execute only once per click of the element), other wise you wont know how many times the function wil be called.

