I wrote an article yesterday to learn javascript (1) Through jQuery source code. There is a method for defining Object C in it. I didn't pay too much attention to the technical details in the early days. Later, I checked the information and found that there were many clever places in it. Today I will share with you the clever 1: Functions
Functions are a rare talent in javascript code.
♥It can return code segments and encapsulate relatively independe
[Basic learning of jQuery] 11 simple jQuery performance optimization and jquery Performance
Performance Optimization
Proper Selector
$ ("# Id") directly calls the underlying method, so this is the fastest. If you cannot find it directly, you can use the find method to continue searching.
$ ("P") the tag selector also directly calls the underlying metho
conveniently without being judged every time. Here, you can use $ (). rightClick (); directly by writing the jquery extension.
JQuery plug-ins are mainly divided into three types
1. Plug-ins that encapsulate object Methods
(This plug-in encapsulates the object and is used to operate the object obtained through the selector, that is, the method needed here)
2. Plug-ins that encapsulate global function
When I was just getting started with JQuery, the downloaded files include jquery. vsdoc. js, jquery. min. js and jquery. js is not very clear about the role of each file and the package to be introduced. Sometimes the introduction of jquery. min. js can be executed, and some
The most successful part of jquery, I think, is that its extensibility has attracted many developers to develop plug-ins to build an ecosystem. This is like the big companies competing to do the platform, the platform to the world. Apple, Microsoft, Google and other giants, all have their own platform and ecological circle.Learning to use jquery is not difficult, because it's easy to learn, and I'm sure you
For JQuery plug-in templates, you can refer to several plug-ins developed in the company's project process. The following is the jquery plug-in template used by Levin. Similar to google.
The Code is as follows:
; (Function ($ ){// Private functions.Var p = {};P. func1 = function (){};// Main plugin body$. Fn. PLUGIN = function (options ){// Set the options.Options = $. extend ({}, $. fn. PLUGIN. defaul
To operate an element on the page, you must first select it, which requires a selector. The selector can be considered as an enhanced getElementById method. The getElementById method returns an HTML element, and the jQuery selector returns a pack of HTML elements. With this package set, jQuery gives HTML elements more operational methods. In JQuery, $ is a core f
From http://blog.163.com/weiweithe@126/
"
The roles of the two files are exactly the same.
In jquery-1.4.2.jsCodeIs the original code without processing, suitable for people to read and research.
The code in the jquery-1.4.2.min.js has been specially processed, such as the variable name is basically written as a letter, and the format indent is deleted.
Therefore, the file size is relatively small (min
This article is reproduced from http://www.cnblogs.com/Wayou/p/jquery_plugin_tutorial.htmlThe most successful part of jquery, I think, is that its extensibility has attracted many developers to develop plug-ins to build an ecosystem. This is like the big companies competing to do the platform, the platform to the world. Apple, Microsoft, Google and other giants, all have their own platform and ecological circle.Learning to use
ArticleDirectory
Useful JavaScript and jquery Techniques
Useful JavaScript/jquery tools
We are regulalry collecting useful JavaScript and jquery snippets, libraries, articles, tools and resources and present them in compact round-ups here, on noupe. This time we are again covering someUseful JavaScript and
Jquery provides two methods for development plug-ins:
JavascriptCode
Jquery. FN. Extend (object );
Jquery. Extend (object );
Jquery. Extend (object); adds a new method to the class to extend the jquery class itself.
JQuery application (3) jQuery chain and jquery Application
In the previous example, the jQuery statement can be linked together, which not only shortens the code length, but also achieves special effects in many cases.
The code above adds the style css1 to the
In the jQuery
As we all know, jQuery is now very popular, and jQuery has already been used on Baidu's new homepage. Today we will summarize how to write better jQuery code to make jQuery Code better and faster to execute, I hope this jQuery tutorial will change your previous unreasonable
jquery Operation Dom:To modify a property:Using the attr () methodattr (name, value)Name: Property name of the property to be modifiedValue: the corresponding valueAttr method, if the current tag has a property to be modified, it will be modified, if not, add directlyExample: $ ("a"). attr ("href", "http://www.baidu.com");To modify multiple property values:attr (obj)$ ("img"). attr ({"title": "File name","src": "Path","Alt:" Picture "})Get Propertiesa
Author: nuysoft/high cloud QQ: 47214707 EMail: nuysoft@gmail.com
After all, it is reading and writing. If something is wrong, please let me know and exchange more information for common progress. This chapter has not been completed yet. After that, a PDF file will be submitted.
Note:
I want to write the system well, but it will start from the interesting part.
Some readers recently uploaded PDF files to Baidu Library. First of all, I would like to thank them for reprinting and dissemination. How
Examples of jQuery plug-ins and jquery plug-ins
I. jQuery plug-in type
1. jQuery Method
A large part of jQuery plug-ins are of this type. Because these plug-ins encapsulate object methods, they operate when the jQuery selector obt
Document directory
What else...
English version Translator: Keel
This article describes how jQuery works step by step based on examples. The following is a Chinese translation (add my additional instructions. If you have any comments or suggestions, please send a reply or EMAIL to your BLOG.
Http://jquery.bassistance.de/jquery-getting-started.html, author J örn Zaefferer
This article has been publishe
The test page must reference the jquery js file plug-in file jquery. Jwin. jsjquery. Jwin. The use parameters of the plug-in are described in the Code below:
The Code is as follows:
(Function ($ ){Var imgdir = 'images/'; // path of the image folderVar autoHide = false; // whether the suspended p is automatically hiddenVar hideType = 'hide '; // optional parameters include hide, slide, and fade.Var hideDe
Jquery. artwl. thickbox. js is a very simple and easy-to-use jQuery pop-up layer plug-in. If you need it, refer to the following final results:
The Code is as follows:
Plug-in for the pop-up layer: jquery. artwl. thickbox. js
Implementation of DOM operations in jQuery. For more information about DOM operations, see. DOM is divided into three aspects, namely DOM Core, HTML-DOM, CSS-DOM.
1. DOM Core is not specialized in JavaScript. It can be used by any programming language that supports DOM.GetElementById (), getElementsByTagName ()... and other methods in JavaScript.
For example, you can use DOM Core to obtain form objects:
Document. getElementsByTagName ("form ");
2, H
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.