Jquery scroll to the bottom of the Code

Source: Internet
Author: User

Jquery scroll to the bottom of the Code

The following is an introduction to jquery code scrolling to the bottom of the top. I hope it will help you.

Jquery scroll to the bottom of the top is a simple scroll to the bottom of the top control. It is a very practical function that helps new users and senior developers create a good user experience. We recommend it to you here. If you need it, you can refer to it.

HTML

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

<! Doctype html>

<Html lang = "en">

<Head>

<Meta charset = "UTF-8">

<Title> image pre-loading </title>

<Link rel = "stylesheet" type = "text/css" href = "css/index.css">

<Script type = "text/javascript" src = "js/jquery-1.8.3.min.js"> </script>

<Script type = "text/javascript" src = "js/index. js"> </script>

</Head>

<Body>

<Div class = "a">

Jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top jquery scroll to the bottom jquery scroll to the top bottom jquery scroll to the bottom of the top

</Div>

<Input type = "button" class = "scrollTop" value = "Back to Top">

</Body>

</Html>

JS Code

?

1

2

3

4

5

$ (Function (){

$ (". ScrollTop"). click (function (){

$ ('Html, body'). animate ({scrollTop: 0}, 'low'); // return to the top

})

})

The above is all the code in this article. I hope you will like it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.