Using jquery to realize the example code _jquery of the typewriter subtitle effect

Source: Internet
Author: User
Tags extend

Implementation effect:

Implementation principle:

Read the code in HTML,

Then skip the code between "<" and ">",

The format of the content is saved by the way

And then a timer, output by one.

Basic knowledge to use:

jquery has two methods for developing Plug-ins, respectively:

jQuery.fn.extend(object);

jQuery.extend(object);

jQuery.extend(object); To extend the jquery class itself. Adds a new method to the class.

jQuery.fn.extend(object);Add a method to the jquery object.

$.fnRefers to the jquery namespace, plus the methods and properties on FN that are valid for each of the jquery instances.

such as extended$.fn.abc() 

Then you can do it like this:$("#div").abc();

$.fxis the jquery effect.

such as the use of display, sliding, fade, animation and so on.

$.fx.offYou can turn off the animation and actually display the results directly.

Implementation code:

<! DOCTYPE html>  

Expand

Let's briefly introduce jquery $.extend :

$.extend

Extend the jquery object itself.

Used to add new functions to the jquery namespace.

As follows: Add two functions to the jquery namespace.

 
 

Summarize

We can see the effect of their own operation, so easier to understand the study, the above is the entire content of this article, I hope that the study and work can help, if there are questions can be exchanged message.

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.