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.

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!