points to a DOM element when using jquery normally. Do not understand this, will often use $ and wrapped again.
(function ($) {
$.fn.myplugin = function () {
//No need to use $ (this)
//$ (this) is the
same as $ ($ (' #element ')) This.fadein (' normal ', function () {
//This here refers to a DOM element
});}
)
(jQuery);
$ (' #element '). Myplugin ();
3, Basic develo
This article reads the catalogue:• Causes• How to develop a lightweight, adaptable plug-in• SummaryCauseIf you have done some front-end development work, there will be some experience: the page needs some kind of effect or plug-in, we generally have two options:1, the Internet to find the relevant JS plugin, learn its usage2, build their own wheels, the development
[Cordova] Plugin Development Architecture Problem ScenarioWhen developing Cordova plugin, debugging native code is a troubling thing, because Cordova's error message is not so complete. It often takes a lot of time and spirit to find out that just one letter is wrong, virtually reducing the efficiency of development.Solution SolutionsTo increase the efficiency of
the combination of installation Build products location and installation directory, which is why both are set.Deployment location is set to Yes, which indicates that the project does not use the build locations in the settings, but instead uses installation directory to determine where to place the build.The relevant file locations generated by the default project are all specified by build locations, and by deployment location set to Yes tells the project that we do not use this default settin
();As you can see from the code above, the development and use of plugins is very simple.Release of PluginsAfter you write the plugin, you can publish it to the official jquery website.First, write a plugin for the information file YourPluginName.jquery.json. The yourpluginname in the file name represents your plug-in name.{ "Name": "Plugin_name", "title": "Pl
patterns and structure of jquery plugin development
jquery Plugin Development
In general, there are two types of jquery plug-ins: A global function that hangs under the jquery namespace, or a static method, or a JQuery object-level approach, a method that hangs under the jquery prototype, This method can also be share
There are two types of jquery plugin development:One is the development of a class-level plug-in that adds a new global function to jquery, which is equivalent to adding a method to the jquery class itself. The global function of jquery is a function that belongs to the jquery namespace, and the other is the object-level plug-in development that adds a method to
Because usually use chrome on the Internet, but always feel in addition to the speed, concise outside there is always a place to meet my needs, and then find plug-ins ... Later found that although the bulk of the plug-in but find a satisfactory is not an easy thing, used in the time to find plug-ins can write a, so, the summer began to write a few leisure time, and then in the Application Center intermittent release, these plug-ins were originally for their own use, But there are a few users who
If a programmer can translate an artist's work into a real-time 3D environment, the game will be that much better. for program programmers, 3D Studio Max is the tool of choice for pre-calculating and real-time 3D scenes. and, in the opinion of this author, Microsoft's DirectX API is the most efficient API for games on Windows Platforms
This article explains how to create a 3DS MAX plugin to export the artist's work into your real-time 3D engine. my in
In the actual development work, always encounter such as scrolling, paging, calendar and other performance of the business needs, for the contact jQuery and familiar jQuery with the use of people, the first thing to think about is to find the existing jQuery plug-in to meet the corresponding display needs. The current page of some of the components commonly used, there are a variety of jQuery plug-ins to choose from, the network also has a lot of spec
In the actual development work, always encounter like scrolling, paging, calendar and other performance of the business needs, for contact with jquery and familiar with the use of jquery, the first thing to think about is to find the existing jquery plug-ins to meet the corresponding display needs. Some of the components commonly used on the page are available in a variety of jquery plugins, and there are many Web sites dedicated to the collection of
function takes a parameter, which is "'+ param + '".');7 .}8 .};
9. The namespace function is still a global function. The method used for calling is as follows:
10. $. myPlugin. foo ();
11. $. myPlugin. bar ('baz ');
With this technique (using an independent plug-in name), we can avoid conflicts between functions in the namespace.
2. Object-level plug-in development
Object-level plug-in development requi
Excerpt from: http://www.poluoluo.com/jzxy/201204/163035.htmlWhile visiting CodeProject website, I suddenly saw an article: How to write plugin in Jquery. If the E-text good classmate, you can see the above connection.Now I write this article on the above website and the combination of my own ideas. Hope to get the support and understanding of Daniel ... The Big Bird flies over ... Welcome to the dress.Source:"1" How to write
In the actual development work, always encounter such as scrolling, paging, calendar and other performance of the business needs, for the contact jQuery and familiar jQuery with the use of people, the first thing to think about is to find the existing jQuery plug-in to meet the corresponding display needs. The current page of some of the components commonly used, there are a variety of jQuery plug-ins to choose from, the network also has a lot of spec
Recently spent a lot of time in refactoring and further refining my web development framework, and strive to in the user experience and interface design, and WinForm development framework to maintain consistency, while on the web, I mainly use Easyui front-end Interface processing technology, take the MVC technology route, in the reconstruction process, Many details spend a lot of time to research and refin
Dynamic loading technology (also known as plug-in technology), when the project is becoming more and more large, we can not only reduce the memory and CPU usage of the application through the plug-in development, but also can realize hot-swapping, that is, to update some modules without releasing the new version.Usually we make the Android resource file into plug-in form, no more than a few:
Zip, jar, Dex, APK (no apk installed, install apk)
': ' Blue '});I feel perfect when I write here, but when I'm ready to publish after dinner, I look at it--oops! It seems there is room for improvement!The usefulness of an anonymous functionNot only is the development of jquery plug-ins, we should be careful to write any JS code should not pollute the global namespace, because with the increase in the amount of code, if intentionally or unintentionally in the global scope to define some variables, it
This article reads the Table of contents:
• Causes• How to develop a lightweight, adaptable plugin• Summary
Cause
If you usually do some front-end development work, there must be such experience: the page needs some effect or plug-in, we generally have two choices:
1, the Internet to find the relevant JS plug-in, learning its usage2, build their own wheels, the deve
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.