first() and last() as a minimal access to the DOM nodes selected