问题标签 [jquery-nestable]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
php - How to change value output after edit Nestable
Example:
https://codepen.io/upgrayedd/pen/OXwAXO
( I copy it ) My project is same that example.
Problem is I need change data-id ( or data-name, data-slug, data-* ... )
But I don't know how to output.
Output:
[{"id":3},{"id":4},{"id":1},{"id":2}]
( In that example )
My output need:
[{"id":10},{"id":4},{"id":1},{"id":2}]
( id = 10 changed from my edit );
I try
$('#nestable2').nestable('serialize');
But it keeps old Output
[{"id":3},{"id":4},{"id":1},{"id":2}]
AND SORRY FOR A POOR ENGLISH. THANK A LOT.
javascript - jquery在laravel中可嵌套返回json
我正在使用msurguy/laravel-shop-menu它以 json 形式返回结果,而它为我的其他模型返回 html 结果。
截屏
如您所见,我的两个菜单运行良好,但其中一个以 JSON 格式返回。
它们的代码都是相同的,我只是在 JavaScript 代码中使用不同的类名来划分它们。
代码
Model
controller
Blade
Javascript
任何的想法?
更新
dd($navbar);
在控制器中
jquery - 使用 jquery.nestable.js 禁用可嵌套列表的拖动
https://github.com/RamonSmit/Nestable2
我正在使用 jquery 可嵌套来制作可嵌套列表。我正在初始化,然后根据文档,尝试通过将 dd-nodrag 应用于每个 dd-item 元素使其只读。但它仍然是可拖动的。
javascript - Provide onclick dynamically and avoid duplicate event calling
I try to add an item, just like this sample: https://codepen.io/Gobi_Ilai/pen/LLQdqJ
And after that try to delete one of the records. The page asked to confirm the question (1+added record) times. For example, if try to add 2 records, and try to delete one item(not last added item), 3 confirm message appears.
How could I manage $("#nestable .button-delete").on("click", deleteFromMenu);
to see only one confirm question.
Thanks.
laravel - 使用 Nestable2 自由拖动项目的问题
我在拖动项目时遇到了一些麻烦。如果该项目位于项目根目录的下方,我只能拖放它。
我想自由地拖动项目,例如,我想拖动 4 的最后一个项目并将其放在首位,在顶部。
Bellow 是在 Laravel Livewire 应用程序中完成的 jquery 代码。
Bellow 是在 Laravel Livewire 应用程序中完成的 jquery 代码。