Home > Web Front-end > Bootstrap Tutorial > How to drag layout elements in bootstrap

How to drag layout elements in bootstrap

Release: 2019-07-30 11:22:34
Original
3517 people have browsed it

How to drag layout elements in bootstrap

The following is the implementation method of dragging table layout elements in bootstrap:

Files that need to be imported

How to drag layout elements in bootstrap

Some places also call it jquery.tablednd.js. Of course, it must be based on jquery and bootstrap table. Import the css and js that should be imported, and then introduce the plug-in. This article It is based on seajs and introduced according to the seajs method.

Then initialize the table normally and add the attributes that need to be

How to drag layout elements in bootstrap

Then add the following method in the bootstrap table initialization configuration (same level as method, url, columns)

How to drag layout elements in bootstrap

The first two methods are not very useful. The newData returned by the last method is the table order after dragging. Of course, it can only be dragged on the current page

Special note: If unsuccessful, additionally add

useRowAttrFunc: true,

to the bootstrap configuration (at the same level as columns) to achieve the effect:

How to drag layout elements in bootstrap

How to drag layout elements in bootstrap

How to drag layout elements in bootstrap

Introduction file address: https://github.com/wangyeky3419/tablednd.js-bootstrap-table-reorder-rows.js

How to drag layout elements in bootstrap

Recommended: bootstrap introductory tutorial

The above is the detailed content of How to drag layout elements in bootstrap. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template