Putting javascript back in its element