JQuery provides many useful tool functions. These functions are mainly divided into two types: functions that operate the set array and non-set array functions. JQuery operations on non-set array Functions
$. Trim (value)
This function is simple.
JavaScript is good at modifying DOM elements on pages, but we use JavaScript to implement some simple functions, such as image flip, tabs on webpages, and so on. This article will show you how to drag and drop created elements on the page. There are
Do not call the method in the method. Otherwise, the parameters of the last js file may always be obtained. To use the parameters in the method, save them with variables and directly obtain the url paramter in the method:
The Code is as follows:
/
One of the outstanding features of jQuery over other javascript frameworks is the element selection function, which allows you to query complex elements through simple conditional statements.
Basic CSS SelectorThose familiar with web development
A new chapter-Dom, focus on Dom
CreateElement (), createTextNode (), appendChild (), removeChild (), replaceChild (), insertBefore (), createDocumentFragment ()
// Create a node
Function CreatNode (){
Var oP = document. createElement ("p ");
OP.
JS object introduction. For more information, see. JavaScript is an Object Oriented Programming (OOP) language.
JS is an object-oriented programming language (Object-Oriented ). (Whether it is object-based or object-oriented. You can search for
Javascript does not implement a hash table (hashtable) like c # and java. In js, the implementation of object attributes is the hash table. Therefore, as long as the point method is encapsulated on the object, the simple and efficient hashtable can
The document object is to continue learning. Document Object
The following table lists some common attributes of the document Object of BOM:
Genus
Description
AlinkColor
The color of the activated link, suchDefined *
ASP. netMVC has implemented a project. I don't know why Search is always executed twice. The page is probably like this, a Partial View, which contains a small section of Javascript bound to Search, which is included in the Jquery-ui dialog, it is
Cross-origin and JSONP of AJAX (another function to automatically add a short address for the article) What is AJAX cross-origin request
For the sake of security, if you want to request the content of another website www. B .com via Ajax from
Currently, I have tried writing jQuery extensions in two ways.
The Code is as follows:
(Function ($ ){$. Navs = function (){Return $ ('# top_menu_bar> li'). each (function (){$ (This). hover (Function (){$ (This). find ('ul: eq (0) '). show ();
The reason why the width attribute of the Span element is ineffective and the solution is to run the following program:
123
Output: 123
We can see that span automatically changes the width based on the contained content.
This is because: For
The following describes some features and usage of jQuery, which is helpful for anyone who has learned jquery.
1. Precise and simple object selection (dom ):
The Code is as follows:
$ ('# Element'); // equivalent to document.
Previously, we found the very Sexy DropDownMenuwjQuery & amp; CSS shared by SohTanaka, which was slightly modified to implement multi-level drop-down and ASP. NET dynamically creates versions by outputting HTML. Interested children's shoes can be
You can choose to use a large number of classic jQuery plug-in posts as needed.
A massive number of jQuery plug-in posts are very classic. I don't know when it will start to spread. I have collected them a long time ago. I posted a copy in the log
This article helps you understand some of the event bubble knowledge.
I. What is event bubbling?Trigger a certain type of event on an object (such as clicking an onclick event). If this object defines the event handler, this event will call this
Sometimes, you need to prompt the keyword of an article. For example, when you move the mouse over the keyword, a text or image is displayed. You can use the jquery plug-in cluetip.
Download link: plugins.learningjquery.com/cluetip/demo/
The
So will you say whether prototype is the same? In fact, I used to understand this too. I saw this problem in this accidental test. First, let's continue with the above Code. Let's extend this Code:
The Code is as follows:
The two functions are the same, except that the parameter transmission method is different. call separates parameters with commas (,), while apply transmits all parameters in an array.
Call and apply methods
The call method can change the context
First of all, I have to say that I cannot go beyond the concepts of classes and objects to see the Javascript realm. There are many statements about whether Javascript is object-oriented, but what I most agree with is that Javascript is a
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