editor,viewer: Don't needlessly keep calling $()

Again, thanks to @aron's unwavering high standards.