Anchors in Accordions [SOLVED]

Before asking my question, I should remind everyone how to create text Anchors in Blocs:

  1. Select a word of text on a page you want to be the target Anchor, then make it a SPAN.
  2. Give your SPAN an ID. You now have created your target Anchor!
  3. Link to that Anchor by creating a separate link that has “PageName.html#YourAnchorName” in it, if on the same page. (PageName and YourAnchorName are names you create within your own site in Blocs.) And if on another page, you would need to type the full URL plus the “#” part at the end.

My question is why this doesn’t work for a target Anchor within an Accordion. More specifically, does anyone know a workaround?

If I follow the 3 steps above when using normal paragraph text (not Accordions), everything works perfectly. Sure, I don’t get “scroll to” functionality, but “jump to” the anchor is satisfactory. The problem is that when I use the above steps on text inside an Accordion, my link to the Anchor does not work. It doesn’t work even if the Accordion is open. I want to know a workaround for this.

Thank you.

If the content container where the ID is, is open it will work. If the accordion is closed it won’t it, needs to be opened first.

1 Like

And thanks to your tip about adding the “show” class, I was able to achieve that.

But there was yet another problem that I had which I just figured out. There appears to be a bug in Blocs that allows you to type uppercase into the ID field of the right sidebar. When you type and hit return, it shows you your all-caps ID in all its glory. Then you preview and find it doesn’t work, which leads you to believe the problem is something else. Then after a few hours go by, and after much ripped out hair, you just happen to see that your ID is all lowercase in the ID field! Blocs bugs strike again!

I honestly wish I had the choice. SoftPress Freeway let’s me use lower or uppercase. I don’t see why Blocs restricts us to only lowercase.

Well, I am filing a bug report nonetheless.

EVERY ID should be in lower case with no special characters or spaces. Thats standard practise, and was actually not good practise for your other software. But I see what you mean about the text box allowing capitals. Blocs does convert it all to lowercase and spaces to hyphens.

But not until you click outside the field, and by that time you will think your Uppercase ID was accepted, when it fact wasn’t. I just filed a bug report to fix that once and for all, requesting that all uppercase IDs be immediately converted to lowercase when the user presses return.

Thats more a refinement than a bug. But a good idea anyway… there was a thread a while ago where someone got upset because they wanted capitals. :roll_eyes:

Well, there is a difference between Standard Practice and valid HTML that works in all browsers. Only one makes programmers happy, while web browsers couldn’t care less. Not being a strict coder myself, I go with what works. That’s why I am not so against the ID of both upper and lowercase IDs. One guy on Quora defends lowercase by saying “they look pretty”!!!

UPDATE: Just found another ID bug. When you duplicate a paragraph that has a SPAN with an ID applied, your duplicate shows the same ID!!