A tutorial on how to use jquery to add effect to a three-dimensional digital scroll bar

Source: Internet
Author: User

jquery implementation of three-dimensional digital scroll bar added effect, the code is divided into two parts, part of the HTML structure of another part of the JS Code section, the need for friends to refer to the next bar!

1, HTML structure

<div class= "NumberRun1" ></div>

2, JS

<script type= "Text/javascript" src= "js/digital_over.js" ></script>//reference
This is a custom function (which needs to be called on the page)
Digital scrolling
Functiondigitalscroll (obj,n) {
Varnumrun = $ (obj). numberanimate ({num:n, speed:2000, Symbol: ","});
Varnums = n;
SetInterval (function () {
Numrun.resetdata (Nums);
Varnumwidth= $ (obj). width ();
$ (obj). Find ('. Mt-number-animate '). CSS (' width ', numwidth);
$ (obj). css (' width ', ' 100% ');
$ (obj). Find ('. Mt-number-animate '). CSS (' margin ', ' 0 auto ');
Window.indexdigitalscroll=function () {
Digitalscroll ($ ('. NumberRun1 '), 1160518);
<!--This is the method that is invoked on the page-->
$ (function () {
Indexdigitalscroll ();

3. Picture Cases

Original link: http://www.cnblogs.com/wuxibolgs329/archive/2016/12/20/6204675.html

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.