Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Using Anchors to jump around in a repeating section

1630650509
Matthew C
Pro
Sheet Author
So first things first. I use anchors in quite a few sections to create a cool popup overlay to keep the charactersheet clean... The problem however is that when I add the popup code outside of the repeating field all the fields access the same one (well duh) but if I try and put the anchor anywhere IN the fieldset tags it won't link to it, it is like it cannot target the field, despite the correct name the code below are both IN a repeating section, basically what I want is for each of the items in the repeating section to have their own unique popup overlay field                            < a   class = "button modifierButton"   href = "#activeInfo"   style = " grid-area:f;margin-left: 3px; " > Modify </ a >                            < div   name = "activeWARPopup"   id = "activeInfo"   class = "overlay" >                                < div   class = "popupActive" >                                    < div   class = "passiveFlex passiveTitle" >                                        < div   style = " min-width: 25px; " ></ div >                                        < input   spellcheck = 'false'   autocorrect = 'off'   type = "text"   name = "attr_activeN"   class = "stanceName" />                                        < a   class = "close"   href = "#" > × </ a >                                    </ div >                                </ div >                             </ div >
1630666970

Edited 1630667052
Oosh
Sheet Author
API Scripter
I don't think you'll be able to use ID as a selector this way in a repeating section without some way of assigning it programmatically... which really requires DOM access, which we don't have. You can achieve a pop-up internally within the repeating row without anchors & id's though - a button next to the <div> containing your popup and the general sibling selector should do the trick with the appropriate CSS. I've not used anchors for this purpose before though - is there something they do that can't be done any other way?
1630667545
Matthew C
Pro
Sheet Author
Thanks for the reply. I have no idea if other methods work nicely for this, I foudn the anchor and it works perfectly. The problem I had with multiple pages and overlays etc. is that they were tied to attributes meaning that if you clicked it, everyone reading the sheet would have things move around, using the anchor since it uses a :checked tag instead of an attribute means it only shows the overlay for the person clicking on the button