js component -- custom scroll bar
Knowledge points:
Native js usually encapsulates the object in the window object prototype, and jquery can also encapsulate the object in $
There are three ways to call the extend method of jquery:
Shallow copy $. Extend (obj 1, obj 2)
Deep copy $. Extend (true, obj 1, obj 2)
After adding the object $. extend({somet ...
Added by AngelicS on Tue, 05 May 2020 12:05:43 +0300
JQuery + bootstrap to create a simple paging component
Bloggers have been writing about the front-end recently, and the director has come up with a demand for paging data display. I thought about it. Anyway, this thing needs to be used later. How about making it into a component and encapsulating it? Isn't it beautiful after that??
OK, no more nonsense, just go to the code ...
Added by TechGnome on Mon, 04 May 2020 11:36:10 +0300
The timer of jQuery does not refresh, and there is no error message; adding debugging message shows that timer only executes once;
Performance: timer does not refresh, no error information is reported; add debugging information to show timer only executes once;
reason:
var timer = $.timer (1000, MAIN.show_time,false);
//var timer = $.timer (1000, MAIN.show_time(),false);
//The above comment is wrong, because when calling the callbac ...
Added by Sangre on Mon, 04 May 2020 07:44:02 +0300
jQuery delete element
With jQuery, you can easily delete existing HTML elements.
Delete element / content
To delete elements and content, you can generally use the following two jQuery methods:
remove() - delete the selected element (and its children)
empty() - remove child elements from selected elements
jQuery remove() method
The jQuery remove() method deletes th ...
Added by HairyArse on Mon, 04 May 2020 00:07:22 +0300
Asp.net MVC simple implementation generate Excel and download
Due to the requirements on the project, you need to export the Excel file with the specified conditions. After a rummage, it finally came true.
Now post the code and share it
(directly share the code of some auxiliary classes in our project)
Our project uses Asp.Net MVC4.0 mode.
Each ActionResult must return a View or Json, etc. (the paramete ...
Added by busterbry on Sun, 03 May 2020 03:07:20 +0300
Cross domain implementation of jsonp+php
Cross domain principle of jsonp
There is no cross domain limit for < script > tags
The difference between json and json
json is a text-based way of data exchange, or a format for describing data.
var person = {
"name": "test",
"age": "25",
"sex": "male"
};
var data = [1, 2, 3, 4, 5];
jsonp is an unofficial cross domain ...
Added by mcrbids on Fri, 01 May 2020 18:31:35 +0300
Mobile debugging artifact (eruda)
In the daily development of mobile terminal, we usually try the mobile terminal mode of Chrome browser for development and debugging. Only when chrome debugging is completed, can we go to the real machine for testing if there is no problem. This is the big problem of mobile terminal development,
Various brands and models of mobile phones, vari ...
Added by ccooper on Thu, 30 Apr 2020 20:57:59 +0300
cropper crop picture and canvas composite picture
Before you can crop a composite picture, you first need to understand canvas and cropper.
canvas
1. Create a node first: var c=ocument.createElement("canvas"); and
2. Create a drawing environment for c: var ctx = canvas.getContext("2d");
3. You can set the width and height: canvas.width=330; canvas.height=440 (see how bi ...
Added by crowezr on Sun, 26 Apr 2020 19:31:39 +0300
Jquery plug-ins (commonly used plug-in libraries)
With the end of Jquery knowledge points, I also began to touch the framework.
At the beginning, I always hear the words "plug-in" and "framework". I wonder what's the difference between framework and plug-in? "??
There are countless plug-ins. Any function in a web page can be called a plug-in. It can be extracted separa ...
Added by sdlyr8 on Sat, 25 Apr 2020 20:18:05 +0300
JS Component Series - JsPlumb Production Flowchart and Detailed Relevant Effects
Top
Foreword: The previous project used JsPlumb, a drag-and-drop flowchart technology from the Web, which is not really difficult, but it feels good to share some flash-like effects made with HTML in the project.
Jsplumb website: https://jsplumbtoolkit.com
GitHub: https://github.com/sporritt/jsplumb/
1. Effect Diagram Display
...
Added by RTT on Wed, 15 Apr 2020 03:55:48 +0300