how to return boolean value in jquery function