Automatic rotation, ajax and other main functions, followed by dom arrangement. Here we use the traditional tabs1 tabs2 hello world!
First, write a closure of the jquery plug-in. A friend in the garden wrote the closure concept of webpage
This is the folding menu effect code of the online help manual implemented by jquery.
; (Function ($ ){
Function load (settings, root, child, container ){$. GetJSON (settings. url, {root: root}, function (response ){Function createNode (parent ){Var
Jquery verifies the validity of user password input.
Jquery verifies the validity of user password input.
Function chkSignIn (language){If (chkUserNameForSignIn ($. trim ($ ("# username") [0]. value), language )){If (chkUserPwd ($. trim ($ ("#
Next, let's take a look at how jquery binds events to various DOM elements in batches.
$ ("Div "). click $ ("div ") all the div labels on the page are bound with a click event for all the div elements. That is, when all the divs are clicked by the
We will see that some websites have a small title or alt effect when we refer to the connection or image. Next I will introduce you to the quick implementation of beautiful webpage Title prompts using jquery, for more information, see.
The
This document describes how to use event.tar get in jqueryevent and some examples. If you need to know more about it, refer.
Show which DOM element triggers the event:
The Code is as follows:
Copy code
$ ("P, button, h1, h2").
In the past, we used JavaScript to implement some image scrolling effects. Below I will introduce a code that uses the jquery plug-in to implement the image scrolling effect on the left and right. If you need to know about it, please refer to
ID is a unique id of some elements on the html page, including div, input, iframe, etc, the following describes how to use jquery to obtain the id value. For more information, see.
The Code is as follows:
Copy code
We will introduce a jQuery smart cut-off text and prompt effect code of a specified length. For more information, see this article. You can download the jquery plug-in package by yourself.
The Code is as follows:
Copy code
This article is a good jquery pop-up window effect code based on the jquery plug-in. For more information, see.
Function usage
$ ('Pop-Up button '). lee_dialog ({dialog: 'floating-layer object', close: 'close button '});
The Code is as
This article collects a large number of conclusions about the select radio box for jquery operations. For more information, see.
Select Box Operation
Get value
The Code is as follows:
Copy code
$ ('# Select'). val ()
The element disappears because it is automatically hidden after I click it. Next I will introduce jquery to hide and display html elements. For more information, see.
This example shows how to make some elements disappear when you click the image
Check the browser version information or browsers. We can determine the user's user-agent features. Next, I will only introduce the inspection of four mainstream browsers. other browsers can be automatically added.
Let's take a look at the
Jquery's html () method is used to obtain the innerHtml of an element. However, in firefox, if the value of some controls changes, such as the input value, the html () method of your element is used, the changed values cannot be obtained, or you
The focus chart plug-in is a good plug-in that often comes out of jquery. With it, we can quickly make a focus chart of various effects. I will introduce it below.
Structure:
The Code is as follows:
Copy code
JQuery's filter selector mainly uses specific filter rules to filter out the required DOM elements. The filter rules have the same syntax as the pseudo-class selector in CSS, that is, the selector starts with a colon. Based on different filtering
The common effect of downward expansion is very simple. You can simply use slideUp and slideDown. If the div to be expanded is absolutely positioned by position: absolute and relative to the bottom, for example, bottom: 0px, The slideDown is called
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.