What I'm trying to do is create a sequence of pop-ups that will be used as a tutorial to learn about the functionality of websites. Pop-ups will appear one after another, explaining what each “div” of the website does. When the popup appears, I want the "div" link to be focused (brought to the front) so that it is more visible.
The code looks like this and obviously does not work:
var someDiv = document.getElementById('someID');
someDiv.focus();
alert("Message explaining functionality");
What am I doing wrong?
source
share