I was trying to execute a javascript 10 seconds after a particular click event.Hence i used `setTimeout`

```
setTimeout(function () {
    alert('hello');
}, 10000);

```

It works if i'm on the same page after the click.But if i navigate to some other page it doesn't work.
So is it right to assume that `setTimeout` works with respect to a particular page and not the whole application.

Is there any way to do what i'm trying to achieve.