I will share a small example of clicking and scrolling up and down written by JQuery. For more information about learning jquery, see. Functional requirements:
1. 10 records are displayed in the scroll box;
2. There is a scroll up or down button,
Due to language design, JavaScript does not have the concept of "class" in the true sense. The new command is usually used to instantiate an object. The essence of this language function depends on the prototype chain pattern unique to
List all the methods to see the differences in the support of different browsers. It is convenient to use js to dynamically set the code of the element css. For more information, see.
1. el. setAttribute ('class', 'abc ');
The Code is as follows:
First, you need to understand jQuery plug-in development in two ways: 1. Class-level plug-in development. 2. Object-level plug-in development. What? What are the class level and object level? Due to work requirements, I have been pondering jQuery
The classification navigation implementation code is based on jquery's public comments. For more information, see. Simple, lightweight, fast, and efficient!
Html structure:
The Code is as follows:
Catering
Catering Channel
In this article, the author will tell you the least-known secret in JavaScript. For more information about js learning, see. Author: Andy Croxall
Link to the original article: Ten Oddities And Secrets About JavaScript
Translation Editor: Zhang xinxu
When you select a piece of text, the system responds to the event and transmits the selected text. I don't know how to write JS, but I will search for it. Here I found something written by someone else:
The Code is as follows:
Select (document,
The intelligent positioning implementation code of the floating layer on the page of the MooTools page. For more information, see. HTML code:
The Code is as follows:
I am a shy floating layer...
JS Code:
The Code is as follows:
Var $
Jquery-based implementation code that allows you to copy and write effects to elements by dragging the mouse. For more information, see. Directly run the Code:
The Code is as follows:
Drag and Drop
That article is an introductory tutorial that explains how to use jQuery & quot; from the perspective of design ideas ;. Today's article goes further to explain & quot; how to make good use of jQuery & quot ;.
Last week, I sorted out jQuery design
After reading the core methods for adding and deleting events recently, I can't help but try to pull jQuery's event module out. JQuery's code is very cohesive and comprehensive. It is not easy to think about independence. JQuery's event module
The 12 most commonly used design patterns are summarized. For details about js learning, refer. 1. Strategy: defines the algorithm family and encapsulates them separately so that they can be replaced with each other.
For example, Collections. sort
The auto-completion function means that a message is automatically prompted after you enter a part of a word, such as Baidu search. Then, you can select a word without entering the remaining part. Let's take a look:
To implement this function, the
I plan to be a js object-oriented greedy snake, but it is aborted. I have compiled the discarded code and reviewed the PPT. If you want to learn js object-oriented, you can also refer to it.
1. js object-oriented implementation
The Code is as
Extract the parameters in the URL as the implementation code of the object. It is suitable for users who want to obtain url parameters.
The Code is as follows:
(Function (){Var urlToObject = function (url ){Var urlObject = {};If (/\? /. Test
Most modern browsers have implemented the innerHTML operation, which is easy to use. However, if it is not used properly, efficiency problems may easily occur. This article uses an example to illustrate how to optimize the innerHTML operation.
When building a webpage layout, we often face a problem, that is, to align a div horizontally and vertically. Although there are several ways to achieve it, my favorite method is introduced today, implemented through css and jQuery.
1. Implement
I think the two essays I wrote were a little irresponsible and I did not understand them at all. I added a document (right .)
Url hash: The section after # in the url, which is usually used to locate an anchor in the html page. Because the hash
After such a long period of development, I have been suffering from verification issues and constantly write a lot of repeated code. It is quite painful for me to be lazy. As a result, I began to summarize it in the previous development. I also
In JavaScript development, I was asked: What is the difference between null and undefined? It is hard to answer at a time, especially undefined, because it involves the implementation principle of undefined. So, after thinking about it, write down
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