Using jQuery, you can create a sliding effect on the element. The jQueryslideDown () method is used to slide down the element. The following describes the parameter meaning of the jQuery sliding method.
With jQuery, you can create sliding effects
JQuery-there are many methods for appending elements, such as append, prepend, And before. The following describes in detail.
1. jQuery append () method
The jQuery append () method inserts content at the end of the selected element.
Instance
This article mainly introduces very smooth JS image scrolling special effects code, seamless loop, And customizable speed. For your reference, refer to the following ideas:
A group of images control its scroll bar and copy the group of images and
This article describes how jquery can automatically complete text in text boxes.
The Code is as follows:
/* Automatically complete zhouxiang in text */
(Function ($ ){$. Completion = function (setting ){Var opts = $. extend ({}, $. Completion.
This article describes how to get the length of a mix of Chinese and English strings in Javascript. The following is a good tutorial. If you are interested, refer to a colleague who posted a post on the company's OA, this section describes how to
I wrote a simple ajax Connection Library and didn't use jquery's ajax. This code is lighter than jquery. Please refer to it for reference,
The Code is as follows:
Var ajax = {Init: function (){Var xmlHttp = new XMLHttpRequest ();If (! Window.
This article describes in detail how to use js to find all the image addresses in an element. The specific example is as follows. For more information, see
The Code is as follows:
Function findImg (){Var charImg = document. all ("chartImg").
Eval usage the eval function receives a parameter s. If s is not a string, s is directly returned. Otherwise, execute the s statement. The following is an example of eval parsing json. The eval usage is simple and can be skipped if you are familiar
This example is a preview image implemented by jquery. When you move the mouse over it to show the actual size, you can learn it if you are interested.
The Code is as follows:
JQuery image preview-jQuery Online Demo-jQuery Learning
Some frameworks also use the $ symbol as short form (like jQuery). If the two frameworks you are using use the same short form symbol, the script may stop running, the following is a good solution. Other JavaScript frameworks include: MooTools,
The css () method is used to set or return one or more style attributes of the selected element. Below are a few good examples for you to feel the css () method to set or return one or more style attributes of the selected element.
Set CSS
In js, the simplest way to traverse arrays is to use for and then use arr. the length can be solved as the maximum value of for. Let's take a look at some useful examples. for () {} traverses the array.
The Code is as follows:
Js judges the data type, such as determining whether it is an array type, determining whether it is a string type, and determining whether it is a numeric type. This article provides several good examples, you can learn 1 to determine whether it is
In JQuery, how does one prevent event bubbles? This article provides two methods to prevent event bubbles. The difference between the two methods is. Returnfalse not only prevents events from bubbling up, but also prevents events. JQuery provides
This article mainly introduces js imitation Baidu Post Bar Verification Code special effect instance code. If you need it, you can refer to the Baidu verification code that is very interesting today and copy it.
Use JS to achieve automatic
This article mainly introduces a small example of js clearing and truncating arrays by using the array length attribute. If you need it, refer to 1. Clearing arrays by length:
The Code is as follows:
ScriptVar arr1 = ['aaa', 'bbbbbb', 'HTTP: //
This article describes how to use the browser full-screen api to implement JavaScript full-screen code examples. In this example, jquery is used to change the address of this library to your own. For more information, see.
The Code is as follows:
(
This article has sorted out some common js custom public functions, such as checking whether the date format is used, determining whether the input characters are Chinese, determining whether the input characters are empty, landline phone number,
This document describes how to use javascript to verify uppercase letters, lowercase letters, numbers, and Chinese characters.
The Code is as follows:
Var reg =/^ [u4E00-u9FA5] + $/; // verify ChineseVar cp = $ ("input [name = 'cpid']"). val ()
On the html page, when the jquery file is not imported, it can be saved normally. After the jquery file is imported, it cannot be saved, it is found that the imported jquery file conflicts with the existing extjs file. 1. It can be saved normally
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