blocking out event javascript