Just want to check: I see that you are testing within the workspace page, which really only shows
index.html and will never load any other html file - therefore, any
div elements you have existing in other files will never be loaded onto the page. If you open it in a new tab and test it there, navigating to different files, does it work there as expected?
@timmy_i_chen No, only works if I´m in the current page. For example, if I´m in index.html and I try to select something from about.html the result will be nun, but if I´m in the about page it´ll select the ID.
@Jose_CC Yes, I can see now - thanks for reproducing. This is working as expected:
The thing is, whenever you re-run the repl, it will always go back to
index.html, which is why it can't find
#two-try. If you try by popping out the browser it should be a lot more clear.
Make sure your JQuery is included on every page.
Please upvote this comment if it helped you in any way.