1, $ () can be $ (expresion), the CSS selector, XPath, or HTML element, that is, the expression to match the target element.
For example: The object constructed by $ ("a") is a jquery object built with a CSS selector-it selects all the tags. Such
a basic selector
$ ("Input"): Select all elements that are input tags
$ ("#input1"): SELECT element with ID INPUT1
$ (". AcSS"): Select all AcSS that contain this CSS class style.
Code
Copy Code code as follows:
link
The examples in this article describe the custom scroll bars implemented by jquery. Share to everyone for your reference, specific as follows:
You can freely define the background of the scroll bar, up and down buttons, of course, not only color,
This article illustrates the effect of the rotary scrolling achieved by jquery. Share to everyone for your reference, specific as follows:
Here to share a rollover effect, first on the effect of the picture:
The specific code is as follows:
In the study of jquery plug-ins, encountered a problem is a new Web project in Webroot under the introduction of jquery Plug-ins when the error, do not know why a good tangle, but the project can be normal operation, and then find solutions, here to
We set 4 div when the mouse moves over a div, the background color changes.
Then we should know to use the mouseover () and mouseout () before one is moved to a certain position, and then a position is removed.
There is also a hover (,) can
The example in this article describes the method that jquery implements to get the index value of an element. Share to everyone for your reference, specific as follows:
jquery Get index value click the corresponding button to
The example in this article describes the effect of jquery when the mouse is passed, while other sibling elements are dimmed. Share to everyone for your reference, specific as follows:
mouse when highlighted, other dark Apple
With jquery, you can easily select the THML element. But in some cases, when the HTML structure is more complex, refining the elements we choose is a more troublesome thing.
1, children
This function gets a direct child of a set of elements.
Pass
Jquery attribute traversal,HTML operations.
Jquery has a powerful way to manipulate HTML elements and attributes.
Here are some of the jquery traversal functions I've sorted out:
. Add ()
Adds an element to the collection of
The show in jquery and the Hide method usage are analyzed in this example. Share to everyone for your reference, specific as follows:
MoU Seover, MouseEnter difference: div in the set Div. See Remarks. is related to event
The MouseEnter event is triggered only once, and the trigger object is a registered object or a child element of the registered object
The MouseOver event can be triggered multiple times, triggering an object that is a registered object or a child
This article has shared two types of jquery asynchronous submission form, the details are as follows
The first way: ordinary Ajax way to submit
$ (function () {
$ (' #send '). Click (function () {
$.ajax ({
type: "Get",
The page is probably like this, a partial view, and this view contains a little piece of JavaScript bound for search, and is included with the dialog of Jquery-ui, and determines that it is not the problem of asp.net mvc generating HTML, HTML is
Because of browser compatibility issues, using JavaScript to get these values is a pretty painful process. Fortunately, jquery offers a simple, elegant, and compatible solution.
Get the width and height of the browser and page document
Copy
1. Disable the right button menu
Copy Code code as follows:
$ (document). Ready (function () {
$ (document). Bind ("ContextMenu", function (e) {
return false;
});
});
2. Let the font blink
Copy Code code as
Classification of DOM operations: Dom Core (CORE), Html-dom, and Css-dom
1. DOM Core
Dom Core is not specifically JavaScript, and can be used by any programming language that supports DOM.
Its use is not limited to processing Web pages, but can
Picture as above. Try downloading pictures. Good effect Oh ... JS is directly connected to the remote on it
Poor code reusability. Hope the Master of the guidance, what should be good
Copy Code code as follows:
Test Navigation
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