Get the selected element.