21294 Posts in 5734 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 310 Views |
-
Smooth Scrolling ***SOLVED***

20 April 2012 at 1:14pm
implementing a "back to top" with a slow smooth scroll but doesn't work when i integrate it into SS?
is this a SS problem? -
Re: Smooth Scrolling ***SOLVED***

20 April 2012 at 1:52pm
I'm assuming you're using jQuery to do this? SS should not be the issue here.
have you checked the console to make sure there are no errors? have you ensured that all of your paths are correct. If you could show me some code that would help.
-
Re: Smooth Scrolling ***SOLVED***

20 April 2012 at 2:30pm
All paths look right & no errors?
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="mysite/javascript/backtotop.js"></script>code located in backtotop.js
$(document).ready(function() {
$('a[href=#top]').click(function(){
$('html, body').animate({scrollTop:0}, 'slow');
return false;
});});
Html <a href="#top"><img src="themes/blackcandy/images/up.png" alt="Back To Top" /></a>
-
Re: Smooth Scrolling ***SOLVED***

20 April 2012 at 5:15pm
tried another
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top}, 500);
});
});& used a "class" & it worked?
<a href="#" class="scroll">back to top</a>
| 310 Views | ||
|
Page:
1
|
Go to Top |


