Does it sound cool? Let's go! Let's go ~
In this issue, Ant will be used to merge the code files written and organized in the previous period into a single source file in the specified order, and then compress the file. This is the basic step for
After studying it, I found that jQuery caches events to prevent memory overflow and the speed of page unload, including multiple function triggers, convenient management and many other benefits. For details, refer to this article.JQuery will unmount
And so on. This has a problem. For example, in a certain line of code, I want to use a declared variable x. As a result, the variable is written as y due to incorrect typing or spelling, the result is equivalent to "implicit" declaring a variable y.
Basic knowledge: and other things. js is written between , so we start with window. onload -- this is not a good thing, so Jquery is quite creative.Copy codeThe Code is as follows:$ (Document). ready (funciton (){...}); Of course, it will be
In addition, srcElement is used in ie to obtain the event trigger source, and target is used in ff. Therefore, browser compatibility is required when these two objects are used. Click [Ctrl + A select all Note: If you need to introduce external
For example, in the format of $ (": text "). bind ("keyup", funcionName); pass the current text box as a parameter to the Function Represented by functionName. How should I write it? I tried $ (": text"). bind ("keyup", functionName (this); this is
I. ReferencesCopy codeThe Code is as follows:// Generate an array objectVar items = new Array ('1', '2', '3 ');// Point a reference to this objectVar itemRef = items;Items. push ('4 ');// Items and itemRef point to the same objectAlert (items.
Bubble eventIn js, "bubble" is not a fancy technique that can be used. It is a mechanism for executing the sequence of js events, the "bubble algorithm" is a classic problem in programming. The "bubble" in the bubble algorithm should be more
For example, our new window fatherpage.htm:XML-Code:Copy codeThe Code is as follows: Then, you can use window. opener in childpage.htm to access elements in the parent form:XML-Code:Copy codeThe Code is as follows: The secret can be changed:XML-Code:
Problem: Make a pop-up layer effect with a drag (like in the prompt box)I wrote about it in half and will continue to struggle tomorrow: Create a javascript pop-up center effect [Ctrl + A select all Note: If you need to introduce external
The next two classes are empty to adjust the column width for the columns that may increase.$ ("Div> p "). parent (). not ($ (". grid_2 ")). filter ("nth-child (" + lenth + "n + 1)") to select the 2nd columns of each row, but select the third column.
This time, the organizational structure of the original code is used to re-enhance the function. Currently, there are two other small issues. The first one is that the custom pop-up layer in ie6 will not be able to cover the select, currently, it
Copy codeThe Code is as follows:$ (Function () {// script })Jquery (function () {// script })Jquery (document). ready (function () {// script }) The above three codes execute the same action. because of the ease of writing, Jquery is more popular
1. Many websites use this method, and the client's browser may have cached jquery. It can be called locally directly, and the speed is faster...2. Google code uses the cdn technology to have node servers in many places. Loading jquery is definitely
Editor's note: This article was shared by a 20-Year-Old Man, Shamuil, a freelance designer and Blogger.
Of the top 1000 most visited websites in the world, jQuery is hardly used. Today, jQuery is infinitely powerful. This article will show you how
A. scrollTop calculation;B. Calculate the positioning value of the rolling element;C. Set the rolling cycle;The Code is as follows:Css section:Copy codeThe Code is as follows:/* Test height */Body {height: 3000px ;}Div, ul, li, body {margin: 0;
Tip: We should always pay attention to browser cache. When using the GET method, we should add the timestamp parameter (net Date ()). getTime () to ensure that the URLs sent each time are different, so that browser cache is avoided.Tip: when a space
Some HTML code:Copy codeThe Code is as follows: the background color is changed when the mouse passes. the background color is changed when the mouse passes. the background color is changed when the mouse passes. the background color is changed
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.