Jquery Custom Plugin

In the previous article, plug-ins with several different functions were introduced. You should think about how plug-ins are generated. A plug-in is a function or a style that a user encapsulates for ease of use. The consumer can simply call a method, or a selector, and so on.This idea is common, and people who type code always think about how t ...

Posted by zimick on Tue, 05 May 2020 17:49:07 -0700

JQuery Getting Started+js Library File Sharing

data Links: https://pan.baidu.com/s/1aHUnfPcs1VJAas5zj5abQA Extraction code: b1hb Include the js library files needed for this section, as well as the api documentation for JQuery What JQuery jQuery is a fast and concise JavaScript framework, which is another excellent JavaScript code base (or JavaScript framework) after Prototype.jQuery was d ...

Posted by GirishR on Tue, 05 May 2020 12:58:12 -0700

Getting and setting the width and height of div by jQuery

There are two ways to get and set the width and height of a div: using the dimension function or using the css method Get width and height 1. Dimension function: height() gets height, width() gets width 2. Obtain div width and height by CSS: obtain height by css("height") and width by css("width") Diffe ...

Posted by skatermike21988 on Tue, 05 May 2020 10:56:29 -0700

Upload files through fromdata

In fact, there are many plug-ins for file upload, but what we do now requires to use as few plug-ins as possible, so I wrote it myself. I've also written about file processing with node before. This time, I'll try it in php. a.html file <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/html"> <head> <meta http- ...

Posted by asd on Tue, 05 May 2020 06:05:32 -0700

AOS.js using and imitating Millet's demo display

AOS.js is a tool library used to present element animation when the page scrolls, similar to WOW.JS, but AOS is a CSS3 animation driven library, which can make elements move when scrolling the page, and when the page rolls back to the top, elements can return to the previous state, which can achieve the effect of circular animation. code ...

Posted by TripleDES on Tue, 05 May 2020 04:42:29 -0700

Using vue.js and jQuery UI to implement sorting

Use vue.js and jQuery UI to implement sorting and only submit the changed order to the background for update JQuery UI is easy to implement sorting with plug-ins, but you need to implement your own to select the changes first. The idea is not difficult. It is to compare the backup and change of the data, and pick out ...

Posted by umrguy on Mon, 04 May 2020 23:25:49 -0700

Preventing bubble events in jQuery preventing default behavior

The bubbling event is to click the child node, which will trigger the parent node and the ancestor node to click the event. Here is the html code: <body> <div id="content"> Outer div element <span>Inner span element</span> Outer div element </div> <div id="msg"></div> </body> ...

Posted by gutogouveia on Sun, 03 May 2020 15:06:10 -0700

jquery's $. ajax() and php background interaction

Look at it. A series of tutorials on novice ajax : I have a preliminary understanding of Ajax, but I mainly want to use ajax to interact with php in front and back, so I want to realize this idea step by step, because I am not particularly familiar with Ajax, so I write rookie like code, sorry.. After reading the series of novice ajax tutori ...

Posted by Dm7 on Sun, 03 May 2020 01:32:16 -0700

Mobile sliding event method

Today, when using jquery.fullpage.js, I found that the mobile debugging does not support sliding events, so I wrote a sliding event. As follows, when using this plug-in, I only need to bind a sliding event to the window, and I don't need to add a method. Since I used it for the first time, I haven't seen the specific information of his JS, but ...

Posted by jamie85 on Sun, 03 May 2020 00:49:08 -0700

JS remove the space before and after the string or remove all spaces

From script house: This article mainly introduces the use of JS to remove the spaces before and after strings or all spaces. Please refer to the following for your friends: The code is as follows: function Trim(str) { return str.replace(/(^\s*)|(\s*$)/g, ""); } Description: If you use jQuery to directly use the $. trim(str) method, str r ...

Posted by codeDV on Sun, 03 May 2020 00:01:51 -0700