Some Skills in jQuery Coding

Cache variables DOM traversal is expensive, so try to cache elements that will be reused. // Too bad h = $('#element').height(); $('#element').css('height',h-20); // proposal $element = $('#element'); h = $element.height(); $element.css('height',h-20); Avoiding global variables jQuery, like javascript, is generally best ensured that your ...

Posted on Wed, 17 Apr 2019 19:24:32 -0400 by artizan

JS Foundation - Date Built-in Objects

Date built-in object Date object creation Timestamp refers to the total number of milliseconds (timestamp) from 00:00:00 on January 01, 1970 (08:00:00:00 on January 01, 1970) to the present. var date = new Date();//Date object of current time var data = new Date(2012,6,10);//Target of July 10, 2012 get series API.png se ...

Posted on Wed, 17 Apr 2019 17:36:33 -0400 by rockstar_tom

Using Three.js Web Engine to Create a Tag Wall with Cool 3D Effects

Use the Three.js engine (this is the open source webgl three-dimensional engine, gitgub) for a simple application. Make a cool 3d tag wall (already in the bottom right corner of my blog home page, visible on pc). Go to my blog home page and see the actual results at www.songshizhao.com The static effect is shown in the following figure: L ...

Posted on Wed, 17 Apr 2019 17:21:32 -0400 by CowGuy

Several common JQuery snippets

1. Background switching effect of navigation menu In the front-end page of the project, the activated navigation menu needs to set different backgrounds compared with other navigation menus. There are many ways to achieve this effect. Here's one way to use JQuery: //Note: Code needs to be polished $('#nav').click(function(e) { // Know the us ...

Posted on Wed, 17 Apr 2019 17:18:33 -0400 by bdeonline

Deep Understanding of FormData, Part 4 of the ajax Series

Front words One of the most frequently used functions in modern Web applications is the serialization of form data, for which the XMLHttpRequest Level 2 defines the FormData type. FormData facilitates the serialization of forms and the creation of data in the same format as forms. This article first introduces form coding, then transitions to ...

Posted on Wed, 17 Apr 2019 12:30:34 -0400 by x01440

25HUI - hui-load-wrap

HUI drop-down refresh instructions You need to refer to hui-refresh-load-more.js <script src="js/hui-refresh-load-more.js" type="text/javascript" charset="utf-8"></script> The core functions hui.refresh(' refreshContainer', refresh, icon1, icon2, loading); Function: To achieve drop-down refresh. Parameters: 1. ...

Posted on Wed, 17 Apr 2019 06:27:32 -0400 by steve8557

Basic module of nodeJS

Module 1In order to write maintainable code, many functions are grouped into different files. In Node environment, A. js file is called a module, and the name of the module is the file name (remove the. js suffix).Create a module hello to call the module elsewhere:'use strict'; var s = 'Hello'; function greet(name) { console.log(s + ', ' + ...

Posted on Wed, 17 Apr 2019 01:57:33 -0400 by bazza84

Deep understanding of event bubbles in jQuery

1. What is bubbles? eg: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Event Bubbling</title> <script src="../../js/jQuery1.11.1.js"></script> <script type="t ...

Posted on Wed, 17 Apr 2019 01:45:33 -0400 by SycoSyco

es6 Learning Notes - String Extension _v1.0_byKL

es6 Learning Notes - String Extension _v1.0 Unicode representation of characters JavaScript allows a character to be represented in the form of uxxx, but before ES6, a single code point only supports u0000 to uFFFF, beyond which it must be expressed in double bytes, otherwise it will parse errors. ES6 has improved this point, as long as the cod ...

Posted on Wed, 17 Apr 2019 01:03:32 -0400 by gum1982

# New features of C# 7.0 (quick-view version)

<New Characteristics of [Translation] C# 7 > It took a lot of time to introduce the nine new features of C# 7.0. Here, based on project experience, I give a quick introduction to them through examples, so that you can understand them in a short time. Overall, these new features make it easier for C 7.0 to write code with the idea of funct ...

Posted on Tue, 16 Apr 2019 23:21:32 -0400 by mizkit73