Simply say event delegation and block bubbling
Html:
All
New York
Los Angeles
Las Vegas
Hawaii
San Francisco
Orlando
data-id= "118" > Seattle
Js:
$ ("ul[data-type= ' Citypick ']"). On (' click ',
Friends who have used jquery know that jquery different versions can cause conflicts, and this article proposes an effective solution to this problem:
Case: Resolve the conflict between jQuery1.3.2 and 1.4.2. (This example has been tested through!)
Implementation principle
First, let's explain how Magnifier works:
Method One: Prepare a large picture of high pixel, when the mouse is placed on the original image, loading shows the corresponding position of the larger picture.
Method Two: To
JS Get browser information
Browser code name: Navigator.appcodename
Browser name: navigator.appname
Browser version number: Navigator.appversion
Support for Java: navigator.javaenabled ()
MIME type (array): Navigator.mimetypes
system
In this paper, an example is given to illustrate the application of IFrame to cross browser Adaptive high resolution method, which is very practical. Share for everyone to use for reference. The specific methods are as follows:
This method uses
Copy Code code as follows:
Bootstrap modal box (partial)
name Original Price
Copy Code code as follows:
/**
* View data details
* @ Black eyed poet
*/
function OrderDetail (order_no)
When I do the project, I pass the data from the background to assign a value to a text box, through Google Browser,
When the change found no changes, and finally looked up the reason, it was jquery in the Val and ATRR ("value", the difference
Rewrite some of the jquery code yourself, and summarize a more useful jquery pop-up box, and save it for later work. Take it if you like!
Code:
jquery implementation pop-up login window Click View Effect x login is an
1. The Strategy Model (strategy): Defines the algorithm family, encapsulates them separately, allowing them to be replaced by each other.
such as Collections.sort (List list, Comparator C); Multiple comparator interfaces can be implemented to
There is no function in the 1:eval, direct execution:
Eval ("Alert (' SS ');"); /all browsers are output correctly
The situation in 2:eval has function,function immediate execution:
Eval (function () {alert (' SS ');}) ();");/ /all browsers correct
Code to get the window size:
Copy Code code as follows:
var pagewidth = window.innerwidth,
var pageheight = window.innerheight;
if (typeof pagewidth!= "number") {
if (Document.compatmode = = "Number") {
PageWidth =
Inadvertently saw the previously written this small thing, posted up, support click Switch and Automatic carousel, for front-end novice to see it!
The code is as follows:
Project one
project two
Project three
project four
This example explains the use of index () in jquery. Share for everyone to use for reference. The specific methods are as follows:
Now there is a problem: if there are more than N list items in the list, I want to know which one I clicked and how
The examples in this article describe the common ways in which jquery dynamically creates HTML elements that are useful when using jquery for Web programming. Share to everyone for your reference. The specific methods are as follows:
In general,
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