Pure js - General carousel, card carousel, stacked carousel

Record the process of making the plug-in of the carousel Design sketch General carousel chart Card carousel Stacked carousel General carousel chart Functions: *Can control whether to rotate automatically *Left and right arrows switch from previous to next, throttling treatment *Put the mouse on the arrow, the picture stops rotating automa ...

Posted on Tue, 12 Nov 2019 06:17:57 -0500 by justinjkiss

JavaScript map, reduce, filter and other higher-order functions

Higher order function Higher order functions are functions that operate on other functions, either as parameters or by returning them. In short, a higher-order function is a function that receives functions as parameters or returns functions as outputs. For example, Array.prototype.map, Array.prototype.filter and Array.prototype.reduce are high ...

Posted on Tue, 12 Nov 2019 03:56:05 -0500 by flash99

The principle and function of Javascript closure

The principle and function of closure 1. The concept of closure: refers to a function that has access to variables in the scope of another function. In general, it includes another function in one function. 2. Function of closures: access internal variables of functions and keep functions in the environment, which will not be processed by garba ...

Posted on Tue, 12 Nov 2019 03:48:22 -0500 by nasser

Prototype rules and design patterns in JavaScript

Prototype rule Prototype rule All reference types (array, object, function) have the characteristics of object, that is, free extension of attributes; All reference types have a proto attribute (implicit prototype), and the attribute value is a common object; All functions have a prototype, and the attribute value is a common prototype; ...

Posted on Tue, 12 Nov 2019 03:46:09 -0500 by eekeek

Vue + Koa build a H5 page visualization editor from scratch -- Quark-h5

Preface I think you must have used micro scene generation tools such as e-business show or Baidu H5 to make cool H5 pages. Besides lamenting its magic, have you ever thought about its implementation? In this paper, we start from scratch to implement a complete design idea and main implementation steps of H5 editor project, and open source the f ...

Posted on Tue, 12 Nov 2019 03:19:18 -0500 by YoussefSiblini

javascript simulates various data structures

Recently, learning about data structures, based on the heart standard of ES6, we have written some custom structure classes (there are also Typescript version links after this article): 1. Stack class Stack { constructor() { this.count = 0; this.items = {}; } push(element) { this.items[this.count] = element; this.count++; ...

Posted on Mon, 11 Nov 2019 22:08:57 -0500 by SCRUBBIE1

Echorts FAQ

This tutorial paves the way for some new people and some simple and common problems When the X-axis label is too long to display, we will use two methods Rotation angle, tilt display xAxis: { axisLabel: { color: "#5e6877", //x-axis font color interval: 0, //0 force all labels, default auto rotate: 20 //Scale label rotation a ...

Posted on Mon, 11 Nov 2019 16:08:08 -0500 by meshi

JS full screen code to solve some browser full screen function errors of PDF.js in iframe

Problem: when iframe is used to embed viewer.html of PDF.js in the page, the full screen function of some browsers is wrong; Details of the problem: the browsers with the problem mainly include: edge (with win10), Firefox (buttons are blocked); Solution:1. If you do not use iframe, the new tab will be opened; - give up: the page experience is n ...

Posted on Mon, 11 Nov 2019 16:05:37 -0500 by yapyapayap

Developing WebSocket online chat communication system with PHP

Need Swoole with thinkp5 To use Swoole in ThinkPHP, you need to install the think Swoole composer package, provided that the system has installed the Swoole PECL extension To install think swoole, execute the composer command in the project root directory of tp5: composer require topthink/think-swoole If you don't say much, go straight to the c ...

Posted on Mon, 11 Nov 2019 11:51:14 -0500 by angrytuna

How to upload pictures to qiniu cloud

Here's how the Upload component in element UI uploads the image to qiniu cloud (free version, with traffic restrictions) I. preparations 1. Go to qiniu cloud to register an account and authenticate with its real name. Without authentication, storage space cannot be created       2. Understand element UI components 2. Create the upload ...

Posted on Mon, 11 Nov 2019 09:03:39 -0500 by dustbuster