MyBB Community Forums

Full Version: Scroll To The Top Smoothly?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys i want to know that how to scroll to the top smoothly cuz it looks really cool so please tell me how
(2013-12-01, 01:41 AM)Whoaranki Wrote: [ -> ]Hello guys i want to know that how to scroll to the top smoothly cuz it looks really cool so please tell me how

something this?

http://markgoodyear.com/labs/scrollup/?theme=image ?
(2013-12-01, 01:53 AM)martec Wrote: [ -> ]
(2013-12-01, 01:41 AM)Whoaranki Wrote: [ -> ]Hello guys i want to know that how to scroll to the top smoothly cuz it looks really cool so please tell me how

something this?

http://markgoodyear.com/labs/scrollup/?theme=image ?

Yeah like that only correct

Come on guys please tell me how
(2013-12-01, 02:38 AM)Whoaranki Wrote: [ -> ]
(2013-12-01, 01:53 AM)martec Wrote: [ -> ]
(2013-12-01, 01:41 AM)Whoaranki Wrote: [ -> ]Hello guys i want to know that how to scroll to the top smoothly cuz it looks really cool so please tell me how

something this?

http://markgoodyear.com/labs/scrollup/?theme=image ?

Yeah like that only correct

Come on guys please tell me how

download scrollup first https://github.com/markgoodyear/scrollup...master.zip

open file and copy jquery.scrollUp.min.js of folder scrollup-master/js/ to root/jscripts

open file and copy top.png of folder scrollup-master/img/ to root/images

edit "headerinclude" templates

Find:

	var imagepath = "{$theme['imgdir']}";
// -->
</script>

add after

<script type="text/javascript">
if (typeof jQuery == 'undefined') {
	document.write(unescape("%3Cscript src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/jquery.scrollUp.min.js?ver=1.0"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($) {
    $.scrollUp({
scrollImg: false,
scrollText: ''
});
});
</script>

open global.css style of your theme

add after all

#scrollUp {
bottom: 20px;
right: 20px;
height: 38px; /* Height of image */
width: 38px; /* Width of image */
background: url(images/top.png) no-repeat;
}
Here's a simple trick to use jQuery Scroll to Top.
(2013-12-03, 07:15 AM)Yaldaram Wrote: [ -> ]Here's a simple trick to use jQuery Scroll to Top.

Oh thank you it worked Smile

Rep+ for you Toungue