Smooth scroller jquery need help.

Permalink
Hi

I will make my site to a one page web site . With the jquery "http://pagescroller.com/"

I have downloaded the file and have this instaled with the instruction.


1. Put the jquery in the scripts by my thmen "/packages/cannonf700_innovation/themes/innovation/scripts/"

2. In the header of the themen put this code "<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

<script type="text/javascript" src="<?php echo $this->getThemePath()?>/scripts/jquery.pagescroller.lite.js"();></script
<script type="text/javascript">

$(document).ready(function(){

// initiate page scroller plugin
$('body').pageScroller.lite({
navigation: '#nav'
});

});


</script>"
3. In the css i creat a new nav . the side nav you can see herewww.www.db-biuro.nazwa.pl/koparko-ladowarki/index.php...

4. Put the nav in c5 with the link footer . And the link is good but i dont have a smooth scroll effect in my page.


Can anyone help me?
sorry for my language:)

bukus9
View Replies: View Best Answer
drbiskit replied on at Permalink Reply
drbiskit
You are including jquery twice in your html doc. Once with the script tag that you have added in (point 2 in your post), and again because it then gets called by default by Concrete 5.

Remove the jquery script tag you have included yourself, and this may be the problem. Including it twice usually screws things up.

Hope that helps!
bukus9 replied on at Permalink Reply
bukus9
Hmmm i have delete this but its not going.

My menu have this code ,

<div id="nav" class="pageScrollerNav standardNav right dark">
<ul>
<li><a href="#footer">footer</a></li>
<li><a href="#">Link 2<br /></a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
<li><a href="#">Link 5</a></li>
</ul>
</div>


I dont understand how can this work this menu and the jquery ...
bukus9 replied on at Permalink Reply
bukus9
Hm i think i have to many scripts in header. Can anyone help me?

<html lang="en">
<head>
<meta name="google-site-verification" content="pD-X4nueh2U1ciX80F1TsYPP-mXVoGn-04-DVF1oDo4" />
<!-- Site Header Content //-->
<link rel="stylesheet" media="screen" type="text/css" href="<?php   echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php   echo $this->getStyleSheet('typography.css')?>"/>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="<?php echo $this->getThemePath() ?>/scripts/jquery.pagescroller.js" type="text/javascript"> </script> 
<script type="text/javascript">
    $('#wrapper').pageScroller({
        navigation: '#nav',
        scrollOffset: -50    
    });</script>
<script type="text/javascript">
   $(document).ready(function(){


and my menu at the site is
<div id="nav" class="pageScrollerNav standardNav right dark">
      <ul>
         <li><a href="#footer">Link 1</a></li>
         <li><a href="#">Link 2</a></li>
         <li><a href="#">Link 3</a></li>
         <li><a href="#">Link 4</a></li>
         <li><a href="#">Link 5</a></li>
      </ul>
   </div>
.


Bud i think its not smooth scrolling :) i mega smoth scrolling and i dont can see this :{ help me.
bukus9 replied on at Permalink Best Answer Reply
bukus9
HI evryone

I have this smooth scrool :)

past this in <head> section
<script type="text/javascript">
$(document).ready(function() {
  function filterPath(string) {
  return string
    .replace(/^\//,'')
    .replace(/(index|default).[a-zA-Z]{3,4}$/,'')
    .replace(/\/$/,'');
  }
  var locationPath = filterPath(location.pathname);
  var scrollElem = scrollableElement('html', 'body');
  $('a[href*=#]').each(function() {
    var thisPath = filterPath(this.pathname) || locationPath;
    if (  locationPath == thisPath
    && (location.hostname == this.hostname || !this.hostname)
    && this.hash.replace(/#/,'') ) {


And you have a smooth scroll on your page :)

Thx