I'm trying to build a block for tb_megamenu of a view of items of a certain content type. I want to use some JavaScript so that when the end user hovers over a title then associated content appears on the right hand side.
I've got the JavaScript/jQuery functionality working by attaching a library to the views display twig template and it works with a simple global text field using the correct IDs. However, it won't work with tokens because all ids will apply to all instances of the field content, so that hovering will show all related content.
Is there a way to separate the fields out like a delta field? I can build this in HTML ultimately but it wont be manageable by the end user ultimately.
Note: The tb_megamenu is irrelevant really. Just a view. Imagine a list of links coming from a field in a content type - Title1, Title2, Title3 - 3 pieces of content. I add another field to the view - Summary for example. I want to display the summary related to Title1 if I hover over Title1. And the summary for Title2 if I hover over Title2. My approach which I dont think can work was to hide the fields and to rewrite the output in a global text field using tokens. I add a javascript library to the view template so that I could use divs in the rewritten output.