Streaming live at 10am (PST)

Maintain element trigger interactions when cloning element in Javascript/jQuery

I have a Rich Text element that I want to parse and generate a table of contents for (TOC). I have some javascript that looks for all H4 tags in the rich text and turns them into a deep link. I have a generic link in the TOC that has hover interactions assigned to it, and jQuery clones it and wires up the links to the sections down the page.

To simplify that explanation, we look for every H4 and create a deep link to it automatically.

This works mostly fine except the TOC hover interactions don’t trigger on the dynamic cloned elements. The linking works, and the static one works (left in as a test), but I don’t know what I need to do to make the interaction work on cloned elements.

Thanks for any help.

Live demo: LINK
Read-Only project: LINK