Back to top Scripts using html,css and javascript.It is very Simple and easy use in any programming language. Easy use following code
backtotop.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Back to top Scripts</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script src="jquery.js" type="text/javascript"></script>
<!-- Back to top Scripts css & js start-->
<script type="text/javascript" >
$(document).ready(function(){
// hide #back-top first
$("#back-top").hide();
// fade in #back-top
$(function () {
$(window).scroll(function () {
if ($(this).scrollTop() > 50) {
$('#back-top').fadeIn();
} else {
$('#back-top').fadeOut();
}
});
// scroll body to 0px on click
$('#back-top a').click(function () {
$('body,html').animate({
scrollTop: 0 //define value margin top to display
}, 500);
return false;
});
});
});
</script>
<style type="text/css">
/*Back to top button*/
#back-top {position:fixed; bottom:30px; right:0px;}
#back-top a {width:100px; display:block; text-align:left; font-weight:bold; font-size:15px; text-transform:uppercase; text-decoration:none; color:#61462e;/* background color transition */ -webkit-transition: 1s;-moz-transition: 1s;transition: 1s;}
#back-top a:hover {color: #61462e;}
/* arrow icon (span tag) */
#back-top span {width:50px; height:50px; display:block; margin-bottom:7px; background:url(images/top.png) #724c28 no-repeat center center;
/* rounded corners */-webkit-border-radius:4px; -moz-border-radius:4px; border-radius:4px;/* background color transition */
-webkit-transition:1s; -moz-transition: 1s; transition:1s; border:2px solid #4e3115;}
#back-top a:hover span {background-color:#bf7b3a;}
</style>
<!-- Back to top Scripts css & js End-->
</HEAD>
<BODY>
<div>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
</div>
<!-- BAck to top Start -->
<p id="back-top">
<a href="#top"><span></span>Back to top</a>
</p>
<!-- BAck to top End-->
</BODY>
</HTML>
Download file jquery.js from "http://jquery.com/"
backtotop.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Back to top Scripts</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script src="jquery.js" type="text/javascript"></script>
<!-- Back to top Scripts css & js start-->
<script type="text/javascript" >
$(document).ready(function(){
// hide #back-top first
$("#back-top").hide();
// fade in #back-top
$(function () {
$(window).scroll(function () {
if ($(this).scrollTop() > 50) {
$('#back-top').fadeIn();
} else {
$('#back-top').fadeOut();
}
});
// scroll body to 0px on click
$('#back-top a').click(function () {
$('body,html').animate({
scrollTop: 0 //define value margin top to display
}, 500);
return false;
});
});
});
</script>
<style type="text/css">
/*Back to top button*/
#back-top {position:fixed; bottom:30px; right:0px;}
#back-top a {width:100px; display:block; text-align:left; font-weight:bold; font-size:15px; text-transform:uppercase; text-decoration:none; color:#61462e;/* background color transition */ -webkit-transition: 1s;-moz-transition: 1s;transition: 1s;}
#back-top a:hover {color: #61462e;}
/* arrow icon (span tag) */
#back-top span {width:50px; height:50px; display:block; margin-bottom:7px; background:url(images/top.png) #724c28 no-repeat center center;
/* rounded corners */-webkit-border-radius:4px; -moz-border-radius:4px; border-radius:4px;/* background color transition */
-webkit-transition:1s; -moz-transition: 1s; transition:1s; border:2px solid #4e3115;}
#back-top a:hover span {background-color:#bf7b3a;}
</style>
<!-- Back to top Scripts css & js End-->
</HEAD>
<BODY>
<div>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
<br><br>
<B>Back to top Scripts:</B><br>
C++, Cobol, MS-Dos batch, CSS, Forth, Fortran, FoxPro, HTML, XHTML, INI, Inno Setup, Java, JavaScript, KixStart, Object Pascal, Perl, PHP, Python, RSS, SQL, TCL/TK, Unix ShellScript, VBScript, Visual Basic, X86 assembler and other 120+ languages included as user highlighter definition
</div>
<!-- BAck to top Start -->
<p id="back-top">
<a href="#top"><span></span>Back to top</a>
</p>
<!-- BAck to top End-->
</BODY>
</HTML>
Download file jquery.js from "http://jquery.com/"
No comments:
Post a Comment