Do you remember the traversal method in jQuery dom tree
Traverse horizontally in DOM tree
There are many useful jQuery methods in the DOM tree that can be traversed horizontally:
siblings()
next()
nextAll()
nextUntil()
prev()
prevAll()
prevUntil()
jQuery siblings() method
The siblings() method returns all siblings of the selected element.
The following example returns all siblings of < H2 > ...
Posted by lvitup on Mon, 21 Oct 2019 13:29:11 -0700
Build your own HTML/CSS/JavaScript real-time editor
Please indicate the source of Reprint: Official website of grape City Grape city provides developers with professional development tools, solutions and services to enable developers.Source: https://blog.bitsrc.io/build-an-html-css-js-playground-64c62133746d
At present, there are many similar platforms and schemes on the market, such as ...
Posted by ChompGator on Sun, 20 Oct 2019 20:47:48 -0700
Add preview and publish buttons for Editor.md editor plug-in
Preface
The Editor.md plug-in has been used as the editor of the blog, which is very good. However, when editing in full screen, you can click the button only when you want to preview or save it in the non full screen state. It's uncomfortable to use it, so it took a little time to add three buttons on the toolbar, preview, save and publish. He ...
Posted by liquidchild_au on Sun, 20 Oct 2019 07:41:43 -0700
Authentication mechanism of Django template (csrf_token)
csrf authentication mechanism:
In django, for POST request, csrf will conduct authentication processing. csrf authentication mechanism is to prevent cross site forgery. Without any processing, POST request will report an error.
csrf authentication -- template operation:
Actions in template file:
In django project, the POST request ...
Posted by ccravens on Sat, 19 Oct 2019 13:41:03 -0700
ThinkPHP uses Swoole to realize WebSocket online chat communication system
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 code:
To create a WebSock ...
Posted by chwebdesigns on Fri, 18 Oct 2019 09:09:25 -0700
sortablejs ---- sorting plug-in
I. what is Sortable
Sortable is a JavaScript library for reordering drag and drop listsTwo. Characteristics1. Support touch devices and modern browsers (including IE9)
2. You can drag from one list to another or from the same list
3. CSS animation when dragging
4. Support drag handle and optional text
5 ...
Posted by jib on Fri, 18 Oct 2019 08:39:10 -0700
The implementation of java + phantom JS generates the images of eckarts in the background (full source code)
Objective: to generate the eckarts statistical picture directly according to options in the java background
The implementation principle of this paper: java calls Runtime.getRuntime().exec() to call phantomjs. Then phantomjs processes the echarts data, and finally generates the image.
Step 1: Download ...
Posted by Zag0r on Wed, 16 Oct 2019 09:51:22 -0700
Implementation of jQuery fade in and fade out rotation chart
Hello, I'm QD Xiaobai. This is the first time in my life to write a blog. I'm going to write about jQuery fading in and out of the implementation of the rotation chart. Before that, I didn't feel good about the effect of learning JS writing the rotation chart. After learning the fading in and out effect in jQuery, I wrote another rotation chart ...
Posted by PetrZagvazdin on Wed, 16 Oct 2019 06:43:59 -0700
Promise introduction and use scenario
Promise introduction
Promise is a constructor and a solution for asynchronous programming. The so-called Promse itself is a container that holds the results of asynchronous operations. Yes, it is similar to a callback function.
The Promise container itself is not asynchronous, but encapsulates an asynchronous task. He has three states: 1. Pen ...
Posted by Iceman18 on Tue, 15 Oct 2019 12:43:26 -0700
Hexo Next theme personalized configuration record (continuous update)
This article records Personal Blog websites Small blog The Next topic optimization process of is updated from time to time.
1. Add statistics function
Turn on busuanzi statistics function in themes/next/_config.yml
# Show Views / Visitors of the website / page with busuanzi.
# Get more information on ...
Posted by mcloan on Tue, 15 Oct 2019 08:25:12 -0700