Use $document as jQuery wrapped `document`.