ZccstSee how it's written.Jquery.extend ({Prop: ""Method:function () {}});As you can see, these methods are static properties and methods of jquery (also known as tool methods) that can be either directly available to the user in the future or used internally.The specific implementation of the tool properties and methods are (also labeled which are used internally)Jquery.extend ({expando: Generate unique JQ string (internal)noconflict (): Conflict pre
some of the custom expando properties. Without this problem can be used, not generic, I do not recommend the use of this method.
3. Call the Reset () method of the form form element.
The reset () method of the form element resets all the input elements within the form, which is not what we expect, so you can work around creating a new form object, putting the file INPUT element in and then resetting it, and then removing the file INPUT element and
the previous key?
Jquery.data (Element,[key],[value]) does not cause overlays as long as they are bound to different objects. Is that right? Let's take a look at their source code.
First look at the Jquery.data (Element,[key],[value]) source code.
JS Code:
Copy Code code as follows:
Jquery.extend ({
Cache: {},
Use with caution
uuid:0,
Unique for each copy of JQuery on the page
Non-digits removed to match rinlinejquery
expando: "J
" types.charat (0) = = ".") {
types = Types | | "";
For (type in events) {
JQuery.event.remove (Elem, type + types);
}
Return
}
We found that in is a recursive call.
If so called
JQuery.event.remove (el, ' click ', fn)
Then it's not going to go to the side of the recursive, but directly into the while loop
Copy Code code as follows:
while ((type = types[i++])) {
...
}
This is the standard process for deleting events. The approximate steps are as f
, find the front of the" L "pairs of words, the letter behind it right, select" Store as Global Variable "then the console to play a Tempx object, it is loaded with the cache of Dongdong." Suppose it's called Temp1. The Temp1 has a get method that can directly retrieve its cache object. If you want to see the ID of the object that binds the event is called ClickMe. That executive Temp1.get (' #clickMe '). Get (0)) (or Temp1.get (Document.queryselector (' #clickMe ')) will play the same thing as
Many students like to store data on htmlelement properties in projects, such as
Copy Code code as follows:
Add the custom Attribute "data" and the value "some data" to the div in the page. Subsequent JS code in the use of getattribute to obtain.
jquery provides a data/removedata method from 1.2.3 to store/delete data. 1.6.1 Code Fragment
Copy Code code as follows:
Jquery.extend ({
Cache: {},
Use with caution
uuid:0,
...
});
That is, add
The code in the data section starts at 1381 lines. The first few lines of critical code:
Copy Code code as follows:
Jquery.extend ({
Where data is stored, the key to achieve the core
Cache: {},
Seed for allocation ID
uuid:0,
To distinguish the data stored by different jquery instances, use the prefix +jquery version number + random number as key
expando: "JQuery" + (JQuery.fn.jquery + math.random ()). Replace (/\d/g, ""),
features more to improve performance. Bigtable is a distributed storage system for managing structured data (see Resources for more information). It will also use its Memcache API to make more improvements.
Another set of enhancements that we'll implement in this article will handle the user experience. Improve the user interface by adding Ajax elements to your application. Not only will Ajax be used, but some data modeling and caching enhancements will be bound to further improve the performa
First of all, to wait for the release of yesterday's friends say sorry. The 1.2PR1, which was scheduled to be released yesterday, was postponed to today, 1.1.5 released as official version number.
The following features are mainly added
1. Separate the seed module from the core to increase the loader. With loader, you can use all of Kissy's features by simply introducing Seed-min.js (9.5 KB) into the page. For example, the Switchable module can be invoked as follows:
Kissy.use ("switchable",
expando: "JQuery" + (JQuery.fn.jquery + math.random ()). Replace (/\d/g, ""),
//whether there is an associated data
hasdata:function ( {},
//set, read custom data or internal data
data:function (elem, name, data, pvt) {},
//Remove custom data or internal data
Removedata: function (Elem, name, pvt) {},
//setting, reading internal data
_data:function (elem, name, data) {},//
whether data
can be set
degradation). The semantic structure is complete in the basic HTML level, and JS is to enhance the interaction behavior and control the presentation form.
If each of us accesses the corresponding wrapper object in the way of $ (' #my '), where is the state variable that needs to be kept for a long time? jquery provides a unified global data management mechanism.
Get Data:
Copy Code code as follows:
$ (' #my '). Data (' myattr ')
To set the data:
Copy Code code as follow
);
//This is a shortcut to avoid jQuery.event.remove overhead
} else {
jquery.removeevent (elem, type, data.handle);}}}
3. If the cache is not removed by JQuery.event.remove, manually remove the cache. Which IE needs to do some compatibility processing, and will eventually save the history of deletion as Core_deletedids
Remove Cache
if (cache[ID) {
delete cache[id] When jQuery.event.remove has not removed cache;
IE does not allow deletion of
Explorer and the between FT JScript engine, especially in scenarios where a webpage defines a expando and the page is refreshed. If a legacy application no longer functions with these changes, the Feature_manage_script_circular_refs FEATURE can disabl e these improvements.
By default, this feature are enabled for Internet Explorer and for applications hosting the WebBrowser control. To disable this feature by using the registry, add the name of your
viewing properties, jquery1.x can perform the binding of the output elements directly on the console $.cache[$('#clickMe').get(0)[$.expando]] , instead of first looking at the value of the jqueryxxxxxxx attribute on the element.
2. After a review and test. One of the most current and jquery1,jquery2 ways to do this is to simply type in the console and lose everything that is $._data($('#clickMe').get(0)) bound to the element. However, the comments f
Dhtml| Tip: This article describes the significant performance impact of some DHTML features and provides some tips for improving the performance of DHTML pages.
Directory
Brief introduction
Batch processing of DHTML changes
Using innertext
To add a single element using the DOM
Extending options in a SELECT element
Updating tables with the DOM
Write once, use multiple times
Do not use dynamic properties too much
Data binding is effective
Do not set the Exp
strokes, automatic scroll bar, and the application of many controls. It's easy to put your control in a div and set the overflow property to auto
6. Dynamically creating Controls
With the placeholder control, this stuff is used even more in asp.net 2.0 Mutil-view and master page.
Sub Page_Load ()
Dim I as Integer
For I=0 to 4
Dim MyUserControl as Control
MyUserControl = Page.LoadControl ("Foo.ascx")
PLACEHOLDER1.CONTROLS.ADD (MyUserControl)
PLACEHOLDER1.CONTROLS.ADD (New LiteralControl
set, the query process has not been finalized. Because these result sets do not necessarily meet our requirements, then we need to filter, to filter. The action to be related to the array. This involves the characteristics of the class array of the JQuery object. We can then put together the related functions of these class arrays to analyze.
When the final set of requirements is formed, we want to do what we really want to do, and manipulate the DOM elements in the collection.
How to operate
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.