Add a function to focus elements by id.