changed .on on from page id to document