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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top