im trying refresh of html/css/javascript knowledge , therefore i'm building new website. wanted menu wich not cause webbrowser reload every time link new page followed went javascript (jquery) approch, this:
have 1 main content wrapper pages in it:
<div class="wrapper"> <div class="content_page" id="home"> // content.. </div> <div class="content_page" id="about"> // content.. </div> <div class="content_page" id="contact"> // content.. </div> </div>
the menu consists of tags class on wich event handler gets registered on , data tag wich specifics content page show:
<nav> <a class="content_switcher" data-id="home">home</a> <a class="content_switcher" data-id="about">about</a> <a class="content_switcher" data-id="contact">contact</a> </nav>
the javascript fades out current page , fades page specified in $(this).data("id");
in.
no have several questions:
- my
<a>
tags not havesrc=
orhref=
attributes, legal html? - while looks googlebot does execute javascript how handle kind of navigation?
- with exception of handling disabled javascript, done better?
- should posted on codereview?