In Multi-page Web content, the JavaScript runs on every page separately, so it may be better to export to Web output instead.
It might also depend on how you have your object with Fixed Element Position set up. We'd be happy to take a look if you could send us the following for us to troubleshoot:
You can send them to us here: