Hello,
I added a Fallback Page Navigation menu to the site.
If a user with deactivated javascript visits the website, he cannot open the menu and hence cannot browse between pages.
I think there should be some kind of fallback, to maximize the reachable audience. Usability > Design.
I just build a clumsy fallback. Better would be progressive enhancement applied on the actual menu.
This is one proposal:
Target:
* enable users without javascript to browse through pages
* only display it as fallback
Implementation:
* write a fallback menu into the DOM
* hide it with javascript on documentReady
* if user has javascript -> menu will be hidden
* if user has no javascript -> menu will be visible, because hiding needs javascript
* it will be a horizontal list displaying the pages
Add to style.css
/* Fallback page nav menu */ #fallback-page-menu { background: black; } #fallback-page-menu a:link, a:visited { color: white; text-decoration: none; } #fallback-page-menu li{ display: inline; list-style-type: none; padding-right: 20px; } [code] Add to header.php into the <head> area [code] <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> <script type="text/javascript"> $(function() { $("#fallback-page-menu").css("display","none"); }); </script>
Add to header.php before
<div id="fallback-page-menu"> <?php wp_nav_menu( array('theme_location' => 'primary') ) ?> </div>
Greetings
Sorry, I messed up the [ code ] syntax. Look closely at the first code section. These are 2 code fragments.
I made a mistake at the css. The anchor part is wrong. here corrected:
Hi again Dinh Bao Dang
I agree, a fallback navigation option would be a good way to go here. Thanks again for your contributions here. I’ll log another ticket for Greg to attend to in this regard.
All the best with your site.