In daily website development and web application development, we often need to effectively call functions related to date and time formats for Javascript processing, javascript contains some of the most basic built-in processing methods. In daily website development and web application development, we often need to effectively call functions related to the processing Date and Time Format of Javascript, javascript contains some of the most basic built-in processing methods. Of course, if you have
an executable file and run them on a computer that does not already have node installed. It is also a cross-platform support for Linux, Windows, MacOS, and FreeBSD.
Project address: "Portal"
Sakura.Sakura is a unique minimalist CSS framework that eliminates the need to add any class for HTML. All you need to do is put sakura.css on any page and it will inherit the default layout and element styles. Because there are no classes, Sakura can quickly generate beautiful pages and is ve
A simple way to resolve the conflict between jquery and other JS (Prototype) libraries is to use the jquery.noconflict () function of jquery.
First, after running this function, you can restore the use of alias $, in the scope of this function will still be $ as the alias of JQuery to use.
jQuery Code:
Jquery.noconflict ();
(function ($) {
$ (function () {
//code using $ as the jQuery alias
);
})
The reason for the conflict between jquery and other JS libraries in the actual development is that their global object definition conflicts, especially the variable "$",You can overload the $ function. You can use Jquery.noconflict () to overload the $ functionExample: Applied in a projectjquery and other JS libraries
The method for solving conflicts between jQuery and other js (Prototype) libraries is very simple. It is to use jQuery's jQuery. noConflict () function. The following small series will introduce you to you. For more information, see
1. After running this function, you can use the alias $ again. In the scope of this function, $ is still used as the alias of jQuery.JQuery Code:
The Code is as follows:
J
The solution of jquery and other JS (Prototype) library conflict is very simple, is the use of jquery jquery.noconflict () function, the following small series for you to introduce, the need for friends can refer to the
First, after running this function, you can restore the use of alias $, in the scope of this function will still be $ as the alias of JQuery to use. jQuery Code:
Copy Code code as follows:
Jquery.noconflict ();
(function ($) {
$ (func
reference the Zepto class library )Other events I will not introduce, JQ we have already learned that we use Zepto to provide the touch event, do some mobile Web page commonly used effect;4.zepto.js using Touch Event development examplesExample 1: tab Toggle with sliding eventsWe learned that the frontal tab toggle, which is in the click Options content is, toggles the content below, on the basis of this feature, we swipe the content area to the left, swipe to the right, or switch the content a
Add the following code before the code to replace the $ in jquery with JQ.
The code is as follows
Copy Code
Remember to load all the JS library can be used Jquery.noconflict () to Overload Oh,
Examples of prototype and jquery.
code is as follows
copy code
var $j = Jquery.noconflict (); $j (document). Ready (function () { $j ("div"). Hide (); });
jquery need to use the $ symbol, if the other JS library (such as the famous prototype) also defines the $ symbol, then it will cause conflicts, will affect the normal implementation of JS code. Jqeury offers a number of options to avoid this problem, let's look at the difference between these scenarios
Programme 1:
Introduce noconflict () and replace $ with other symbols
Copy Code code as follows:
Basic jquery. js Library
----------------------------------------------------------
Jqueryui Component Library
----------------------------------------------------------
Date. js date class => PHP-like strtotime () facilitates Time Processing
Arraylist. js array class => PHP-like associated array
The Extended Data Structure class of stream.
This article describes how to solve the $ naming conflict between the Jquery Library and other libraries. If you need it, refer to it. First, we should know that in jquery, $ (dollar sign) that is, the alias of jquery. That is to say, $ is the same as jquery. In many cases, the namespace conflicts occur due to this $. For example, although $ ('# xmlas') and JQuery ('# xmlas') are different in writing, they are actually exactly the same.
To solve this
1. After running this function, you can use the alias $ again. In the scope of this function, $ is still used as the alias of jQuery.JQuery Code:Copy codeThe Code is as follows:JQuery. noConflict ();(Function ($ ){$ (Function (){// Use $ as the jQuery alias code});}) (JQuery );// Code that uses $ as an alias based on other libraries2. After running this function, you can create a new jQuery alias to replace the original jQuery alias $.JQuery Code:Copy codeThe Code is as follows:Var j = jQuery. n
One, the Linux operating system support function library BranchStatic libraries: LIBXXX.A, compiling libraries into executable programs at compile timeAdvantage: No external function library is required in the program's running environmentCons: Large executable programDynamic libraries: Also known as shared libraries,
1. Runtime Library: a typical Runtime library example in UNIX is libc, which contains standard C functions, such as print () and exit, users can create their own runtime libraries (DLL in Windows), and the specific details depend on the compiler and operating system.
2. Static Library: functions and data are compiled into a binary file (typically with the extension. lib), the static library is actually linked to the EXE during the link, and the libr
Very useful 15 open-source PHP class libraries and 15 open-source class libraries. 15 Very practical Open Source PHP class libraries and 15 open source class libraries provide developers with a standard interface, which helps developers make full use of object-oriented programming in PHP. These
10 common JavaScript animation function libraries and javascript function libraries
1. Snap. svg
SVG is a great way to create interactive animations. Vector images with independent resolutions look good on any size screen. The Snap. svg library makes operations on SVG as simple as jQuery operations on DOM.
Ii. Motio
A simple but powerful JavaScript Library Based on animation and Heping
3. animo.
Very useful 15 open-source PHP class libraries and 15 open-source Class Libraries
The PHP Library provides developers with a standard interface that helps developers make full use of object-oriented programming in PHP. These libraries provide a standard API for specific types of built-in functions, allowing classes to interact seamlessly with the PHP engine. In a
$});
Thus, the complete code that is implemented according to the first method is as follows:
code is as follows
copy code
//jquery the complete solution to conflicts with other libraries $.noconflict (); jquery (function ($) { //using $ jquery code }); //This is your other JS library code
Of course, you can also simplify the com
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.