Jump to content

[Nicescroll] Smooth scrolling page. Or simular.


Recommended Posts

Hi,

 

It could be interesting to make a module with options configurable... :)

 

But if you just want to try it out, you can :

- Download the plugin, and copy it to the js folder of your theme (prefer the minified version)

- Then add the folowing at the end of your theme's footer.tpl

<script src="{$js_dir}jquery.nicescroll.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("html").niceScroll();
});
</script>

 

It's quite nice indeed, but useful ??? ;)

  • Like 2
Link to comment
Share on other sites

Ok, which PS version is it? Anyway place the .js file straight in root/js folder!

If 1.5.X. open your FTP /classes/controllers/FrontController.php

 

scroll down to line 715 to

public function setMedia()

 

There you should see this code

$this->addCSS(_THEME_CSS_DIR_.'global.css', 'all');
$this->addjquery();
$this->addjqueryPlugin('easing');
$this->addJS(_PS_JS_DIR_.'tools.js');

which you'll modify to

 


$this->addCSS(_THEME_CSS_DIR_.'global.css', 'all');
$this->addjquery();
$this->addjqueryPlugin('easing');
$this->addJS(_PS_JS_DIR_.'tools.js');
$this->addJS(_PS_JS_DIR_.'NameOfTheJquery.js');

 

 

where NameOfTheJquery is of course Name of the jquery nicescroll plugin :-) I think it should be this jquery.nicescroll.js

 

And now, simply open the jquery.nicescroll.js file and at the end of it, put the code Mellow suggested.

$(document).ready(function(){
$("html").niceScroll();
});

 

It's working for me!

Edited by PSfever.com (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...