This line is what makes the destroy work properly.  Before this the show function was still attached to the element the monthpicker was attached to.  This would cause an error if you called destroy and then focused on the input field.