A jQuery common method and function of the article retention memo.
How jQuery common operations are implemented
$ ("label name")//Fetch HTML element document.getElementsByTagName ("")
$ ("#ID")//Fetch single control document.getElementById ("")
$
Comprehensive overview
jquery in the 1.7.x version, remove the browser sniffer support, recommend the use of feature detection, however, in the actual project, more or less need this functionality.
Compatibility
ie6+, Chrome, Firefox, Safari,
The innerHTML assignment of Table/select in IE6/7/8/9 will be an error, as follows
IE6/7/8/9" > innerHTML cannot be assigned a value & lt;/title>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to
such as setting the Class property
Copy Code code as follows:
El.setattribute (' class ', ' abc ');
The style "ABC" in IE6/7 will not work, although using El.getattribute (' class ') can fetch the value "ABC".
Also as for
Example 1
In this example we'll create an array and sort it alphabetically:
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Output:
10,5,40,25,1000,1
1,10,1000,25,40,5 Note that
This example describes the use of the Innerheight () method in jquery. Share to everyone for your reference. The specific analysis is as follows:
Gets the inner area height of the first matching element.Includes inner filler (padding), excluding
Because recently learned a little JS, so I pretended to be forced ... It's not too hard. Just cut the display property? My classmates ignored me. Said to get a general ... What also interacts with Ajax ...?? I leng not understand ... What the hell
JQuery slider plug-ins are generally made up of sliders and sliding buttons, as well as some with pause and resume buttons. Generally used slider slider plug-in, according to the display, can be divided into two kinds: one is for horizontal sliding,
Before discussing the mutual exchange of jquery objects and Dom objects, agree on the style of defining variables. If you get an object that is a jquery object, add $ before the variable, for example:
Copy Code code as follows:
var $
This article illustrates the method of implementing the navigation menu of the personalized flop effect in jquery. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
jquery
$.browser is a regular expression to match the useragent to determine the browser version and kind of the. jquery1.3.2 version of the document has been declared Jquery.browser and jquery.browser.version recommended deprecated, you can use the Jquery.
A new day to start, today to share is to use jquery to imitate the dock effect of Apple operating system desktop, called the primary version, because there are some bugs, the display effect is not stable. Due to the relationship between the time,
Lazy Load is a jQuery plug-in written in JavaScript. It can delay loading a picture in a long page. Pictures outside the viewable area of the browser are not loaded until the user scrolls the page to their location. This is exactly the opposite of
Generally we use CSS to set the style in bulk, now we use JS can also set the style of the batch:
The summary of three methods is as follows
Copy Code code as follows:
Untitled Document
Today for you to bring a mouse through the current highlight other darkened jquery plug-in Jfade, this plug-in can be implemented simple and very practical, when the mouse over the picture list or text list when hovering the current highlight, the
The example of this paper describes the implementation of the image slide flicker switching of jquery fading fade. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
jquery
This example describes the use of the Add () method in jquery. Share to everyone for your reference. The specific analysis is as follows:
This function adds an element that matches an expression in a matching element.The result returned by the Add (
Be asked a question:
What is the difference between the use of these three labels? Although it has been used, but also did not make it clear, here detailed description.Check out some information, mainly browser support issues. Both
About the development of jquery Plug-ins have done a little research, they have written a number of plug-ins, in their own team has also shared a lesson on plug-ins. At the beginning, the whole complex of the code, now look at the time is much
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