Memasang Tombol Smooth Back To Top dengan Jquery dan CSS
Back to top button
HTML
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<title>MEMASANG TOMBOL SMOOTH BACK TO TOP DENGAN JQUERY DAN CSS</title>
<body>
If you think you don’t have any experience, </span><b style="font-family: inherit; font-size: 13.5pt;">THINK AGAIN!</b><span style="font-family: inherit; font-size: 13.5pt;"> You may not have specific job experience, but you do have work experience.</span><br />
<a name='more'></a></div>
<div class="MsoNormal" style="text-align: left;">
<span style="font-size: 13.5pt;"><span style="font-family: inherit;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: left;">
<span style="font-size: 13.5pt;"><span style="font-family: inherit;">You have "worked" as a homemaker, a student, a volunteer, in a hobby or some other personal activity. The skills you use for these "jobs" can be applied to other jobs.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: left;">
<span style="font-size: 13.5pt;"><span style="font-family: inherit;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: left;">
<span style="font-size: 13.5pt;"><span style="font-family: inherit;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: left;">
<b><span style="font-family: inherit;"><span style="font-size: large;">Household skills</span><span style="font-size: medium;"><o:p></o:p></span></span></b></div>
<ul type="disc">
<li class="MsoNormal" style="text-align: left;"><span style="font-size: 13.5pt;"><span style="font-family: inherit;">Sewing<o:p></o:p></span></span></li>
<li class="MsoNormal" style="text-align: left;"><span style="font-size: 13.5pt;"><span style="font-family: inherit;">Child care<o:p></o:p></span></span></li>
<li class="MsoNormal" style="text-align: left;"><span style="font-size: 13.5pt;"><span style="font-family: inherit;">Making clothes<o:p></o:p></span></span></li>
<li class="MsoNormal" style="text-align: left;"><span style="font-size:...
CSS
/*
|--------------------------------------------------------------------------
| UItoTop jQuery Plugin 1.2
| http://www.mattvarone.com/web-design/uitotop-jquery-plugin/
|--------------------------------------------------------------------------
*/
#toTop {display:none;text-decoration:none;position:fixed;bottom:10px;right:10px;
overflow:hidden;width:40px;height:40px;border:none;text-indent:-999px;
background:#fff url(http://4.bp.blogspot.com/-u5eNR3_Koe4/UvA__vdHdAI/AAAAAAABLTk/GeV5RC40Xds/s1600/totop_button.png) no-repeat left top;}
#toTop {
display:none;
text-decoration:none;
position:fixed;
bottom:10px;
right:10px;
overflow:hidden;
width:51px;
height:51px;
border:none;
text-indent:100%;
background:url(http://3.bp.blogspot.com/-f4w48d-MePQ/UvBDTiYyihI/AAAAAAABLT4/k9p7sF0NqI0/s1600/ui.totop.png) no-repeat left top;
}
#toTopHover {
background:url(http://3.bp.blogspot.com/-f4w48d-MePQ/UvBDTiYyihI/AAAAAAABLT4/k9p7sF0NqI0/s1600/ui.totop.png) no-repeat left -51px;
width:51px;
height:51px;
display:block;
overflow:hidden;
float:left;
opacity: 0;
-moz-opacity: 0;
filter:alpha(opacity=0);
}
#toTop:active, #toTop:focus {
outline:none;
}
JavaScript
/*
* jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php
*
* Uses the built In easIng capabilities added In jQuery 1.1
* to offer multiple easIng options
*
* Copyright (c) 2007 George Smith
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*/
jQuery.extend( jQuery.easing,
{
easeInQuad: function (x, t, b, c, d) {
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d) {
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d) {
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d) {
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d) {
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function...