I have a one-page LMS site that utilizes 'table of contents'-style navigation, where anchors are used to load sections as clicked. I want to embed some H5P content types that have their own anchor-based navigation, specifically interactive books. If I embed through an iframe, the parent window's anchor fragment is overwritten by the subframe's (say, the next page in the H5P book), and the section crashes.
Manually appending the site URL with the original fragment as a string works, ie #section-1&
, and I'm at a loss on how to prevent the book anchor from not only overriding the parent URL, but also tack on to its end, particularly as an automated process across the site (in case there are multiple books).
I know having multiple hashes in a URL isn't ideal. I'm sure there's a JQuery fix for this, but my knowledge is limited on how to even approach researching. Apologies if it's a simple fact that I should understand by now.