]$. Merge (arr1, arr2): merges two arrays and deletes repeated items.For example:$. Merge ([, 2], [, 4]) // return [, 4]
$. Trim (str): removes spaces at both ends of a string.For example:$. Trim ("hello, how are you? "); // Return" hello, how are you? "
11. Resolve conflicts between custom methods or other class libraries and jQuery
Most of the time, we define the $ (id) method to obtain an element, or som
= '#']") // select all elements with the href attribute and the href value is #.
$ ("[Href! = '#'] ") // Select all elements with the href attribute but the href value is not equal #.
$ ("[Href $ = '.jpg ']") // select all elements with href and whose href value ends with .jpg.
4.3 cssSelector (optional optional element ).css ("attribute", "value ");)
You can use the css selector to change the CSS style of the selected element.
((“P”).css ("background-color", "red"); // modify the background co
integration, new animation APIs, new ways to escape strings, stronger SVG support, improved async Callback, better compatibility with responsive web pages, and higher security.
1. Remove the old IE workspace
One of the most important goals of the new version is to be faster and lighter, so that previous versions of the technology and workspaces that were earlier than the IE9 browser were removed. This means that if you want to continue t
tabtest.
Finally, Beginners should never feel overwhelmed by unfamiliar code. Remember that jquery is very simple.
Finally, related comments:
1.The building owner writes so far that jqueryhas The. CSS method $ (function () {$ ("# tabtest TR: Even" ).css ("background", "# ff0000"); $ ("# tabtest TR: odd ").css (" background "," #00ff00 ");})
2. Write well, but it is better to add some comparisons
This article mainly introduces the core (1) architecture of jQuery2.0.3 source code analysis. If you need it, you can refer to an open-source framework. What you want to learn most is design ideas and implementation skills.
Not much nonsense. jquery has been writing bad Analysis for so many years and has read it before,
However, I have been working on mobile terminals over the past few years, and I have be
JQuery basic learning skills summary 1. Introduction
1.1 Overview
With the rapid development and dissemination of WEB2.0 and ajax ideas on the Internet, some excellent Js frameworks have emerged one after another, among them, Prototype, YUI, jQuery, mootools, Bindows, and JSVM frameworks in China are well-known, by applying these JS frameworks to our projects, p
two versions:
The uncompressed version is mainly used in development.
The other is minified. After the development is complete, you can use this version.
Differences between the two versions
The file size is different, and the end user can reduce the waiting time for JS download during browsing.
The size of uncompressed files is 118kb.
Minified file size: 56kb
What does jquery bring to us?
1
JQuery learning notes (1), jQuery learning notes (
1. What is jQuery?
JQuery is a JavaScript function library.
JQuery is a lightweight JavaScript library that "writes less and does m
.
Continue to read the HTML code:
The Code is as follows:
For example, you need to select a red-green Single-stick,
You can use a tag name to restrict (modify) class, as shown below:
Var active_light = $ ("input. on ");
Of course, you can also combine the nearest ID, as shown below:
Var active_light = $ ("# traffic_light input. on ");
When using tags to modify the class, we need to pay attention to the following points:(1) do not use t
problem. However, the data method does not appear this way regardless of what is mounted.The principle of data:When you call $ ("#div1"). Data ("name", obj), a custom attribute xxx is added to the element Div, whose value is a cumulative unique value in jquery, here is 1, and then the global variable cache object of jquery is added
In jquery, $ (dollar sign) is the alias of jquery, meaning that using $ is the same as using jquery, and many times when we namespace, it is because of this $ that conflicts occur. For example: $ (' #xmlas ') and jquery (' #xmlas ') are different in their wording, but are actually identical.The simplest way to resolve
Series of articles:
Learning jQuery's omnipotent selector from scratch
Learning jQuery from scratch the JavaScript you must know
This chapter has very little content. It mainly describes how to dynamically create elements and operate functions in the jQuery package set.
1. dynamically create elements
1. Incorrect Progr
When I read an open-source framework, what I want to learn most is design ideas and implementation skills.
Not much nonsense. jquery has been writing bad Analysis for so many years and has read it before,
However, I have been working on mobile terminals over the past few years, and I have been using zepto. Recently, I took some time to scan jquery again.
I will not follow the Source translation of xuanke, a
JQuery learning Notes 1. Jquery Introduction 1. JQuery is an encapsulation of JavaScript (many extensions of JQuery) 2. $ (# div) in JQuery) # indicates that one element is not added #
Article Introduction: The jquery development team released its first beta version of 1.8 today.
The jquery development team released its first beta version of 1.8 today.
This release introduces a number of new features, including:
1. Modular
In jquery 1.8, you can remove some unwanted modules to build
check whether the image is loaded before using the image, you can use the following code:
Code:
The Code is as follows:
Var imgsrc = "img/img.png ";$ (ImageObj). load (function (){Alert ('image loaded successfully ');}). Error (function (){Alert ('image loading error ');}). Attr ('src', imgsrc );
(3) How can I use JQuery to check whether multiple images are fully loaded?
Note: As shown above, there are
JQuery selector 1 developed by jQuery
1. CSS Selector The following table lists common css selectors:
2. jQuery Selector The code for getting elements from CSS is as follows:
. Demo {// Add a style to the element whose class is demo ...}
The code for
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.