I have a few links on a page which refers to some content divs on the same page. I’m trying to create a very simple horizontal sliding effect to sliding effect to show the content. For example, initially only box1 content should be visible, and when clicked on link2, the box2 content shold slide in.
<a href="#box1">Link 1</a>
<a href="#box2">Link 2</a>
<a href="#box3">Link 3</a>
<div class="content">
<div id="box1">..</div>
<div id="box2">..</div>
<div id="box3">..</div>
</div>
Please have a look at the jsfiddle here: http://jsfiddle.net/G9eVf/
Maybe something like this?
http://jsfiddle.net/3Vrh9/4/
Making use of this plugin
http://demos.flesler.com/jquery/scrollTo/
Plugin source:
http://demos.flesler.com/jquery/scrollTo/js/jquery.scrollTo-min.js