Frage

I have a JavaScript accordion on this site that features within it, the primary functionality for the site. It is based off of this post.

When someone has JavaScript disabled or for whatever reason the panels aren't expanding, is there a way to set it so that clicking on them will act as a traditional hyperlink?

That way users can still be directed to content that they need and the site isn't "broken" for them.

War es hilfreich?

Lösung

You can use the noscript tag to provide content for those that have JS disabled. That should work no matter what plugin you're using.

Read more: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript

So, basically, you can really go creative and build a separate menu for non-JS users.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top