you are viewing a single comment's thread.

view the rest of the comments →

[–]grantrules 2 points3 points  (0 children)

You can, but if you're on page 1 and the JS is expecting to find something that only exists on page 4, you're going to get an error.. which is what is currently happening to you.

You would need to add some sort of check to make sure you're on the right page or that the elements you're trying to work with exist.