March 5, 2012
Setting default anchor in jquery tools scrollable
Question by Ben Matewe
I am using jquery tools scrollable to create a 3 page site with a panoramic background (each background representing a page). I need the homepage to show as default. My current order is projects, home and contact and projects shows as default. I have tried using index.html#home but it doesn’t work. I am using horizontal scrolling.
My navigation menu is
<li><a href="#projects">Projects</a></li>
<li><a href="#home">Home</a></li>
<li><a href="#contact">Contact</a></li>
and my page code is:
<div id="browsable" class="scrollable">
<div class="projects"> ... </div>
<div class="home"> ... </div>
<div class="contact"> ... </div>
and this bit does my scrolling
$("#browsable").scrollable().navigator();
Answer by Starx
Defining links by href-"#projects"
is wrong. Use as equals to (=) sign for that purpose.
<li><a href="#projects">Projects</a></li>
<li><a href="#home">Home</a></li>
<li><a href="#contact">Contact</a></li>
Your index.html#home
should work now.