Hi all,
I have a horizontal-scrolling site that I'm trying to put together, but I'm a little bit stuck on getting it to work in Drupal. I've enabled the module, put the localScroll and ScrollTo libararies in their correct respective places under /sites/all/libraries, and have enabled the plugin.
I have a simple menu with links set up like so:
Here's the menu:
<div id="nav-bar">
<ul class="menu-buttons">
<li class="button"><a href="#showcase">Showcase</a></li>
<li class="button"><a href="#artwork">Galleries</a></li>
<li class="button"><a href="#about">About</a></li>
<li class="button"><a href="#weblog">Blog</a></li>
</ul>
</div>Here are the pieces of content I want to scroll to:
<div id="test">
<div id="showcase" class="side-body">
<a name="#showcase"><h2>Showcase</h2></a>
<?php
print views_embed_view('showcase');
?></div>
<div id="artwork" class="side-body">
<h2>Galleries</h2>
<?php
print views_embed_view('gallery_display');
?></div>
<div id="about" class="side-body">
<?php
print drupal_render(node_view(node_load(15)));?>
</div>
<div id="weblog" class="side-body">
<h2>Blog</h2>
<?php
print views_embed_view('blog');
?></div>
</div>
Naturally, I thought that having #nav-bar as the CSS ID would work, but unfortunately setting that causes the buttons in the menu to not work at all. The same goes for trying ul.menu-buttons. What exactly am I doing wrong here, and how can I get this plugin to work?
I can verify with my debugger that the actual localScroll lib is loading, so I'm not 100% sure of what to do next here.
Comments
Comment #0.0
DeadSuperHero commentedRemoved an href from the nav-bar div tag since someone asked about it. Still no luck yet.
Comment #1
Colin @ PCMarket commentedI had similar issues getting this module to work but finally got it working by following the suggestion as in http://drupal.org/node/1931484 .
ie. you need to add the #id in the css id box of the modules settings.
Comment #1.0
Colin @ PCMarket commentedUpdated into two code blogs to explore further.