sortable

jQuery UI Sortable - Error: cannot call methods on sortable prior to initialization; attempted to call method 'disable'

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a jQuery UI Sortable list element that is populated dynamically from an Ajax request. Currently, the workflow goes User clicks button, list is populated and sorted by specified settings. User clicks another button, Existing list <li> elements are erased by jQuery.empty() call New data values are inserted into new <li> list elements and appended to <ul> list Sortable list is refreshed via $("#sortable").sortable("refresh"); Given a Sortable list object $("#avail_list").sortable( ... ); , I want to have specific list elements' draggable

jQuery .sortable is not a function

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Even though I've followed the directions in the jQuery UI documentation, I'm getting the error that .sortable is not a function. Here is my code: <div style="float: left;"> <span class="caption" style="width: 255px; display: block;"> Assigned Limits </span> <div class="assigned-limit-box"> <ul id="limAssigned" class="ul-base"> </ul> </div> </div> This is my js: $('#limAssigned').sortable(); My jQuery js is loaded before my jQuery UI js. What am I doing wrong? 回答1: I had the same issue when a page using the sortable() function was required by

Prevent items to be &#039;droppable&#039; in other (parent/child) elements

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use knockout-sortable.js to let the user drag and drop items to give them a different order, but I'm experiencing problems when I have multiple 'drop zones' on my page. I have nested sets, all of which are sortable, but not interchangeable. My code: <div class="sortable" data-bind="sortable: blueprint.pages"> <tr><td>Blabla</td></tr> </div> And at some other point: <div class="sortable" data-bind="sortable: selectedPage().page_sections"> <tr><td>Another blabla</td></tr> </div> I can now just drag and drop 'Another blabla' into 'Blabla',

jQuery Nested Sortable - Move LI elements within all available UL's

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have the following code which works although it runs quite slowly I feel. What I want to do is allow 's to be moved freely under existing 's or move them up a level. I also want to be able to create hierarchies so if you dragged a under another that would create a hierarchy. I think in that sense I would have to render a under each just in case. I only want to limit it to 2 or 3 levels deep. $ ( "#sort_list" ). sortable ({ containment : 'parent' , axis : 'y' , revert : true , opacity : 0.8 }); $ ( ".sub_list" ). sortable ({

jQuery UI Sortable and Cookie

匿名 (未验证) 提交于 2019-12-03 01:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I must admit, that I'm pretty much newbie to jQuery, though I want to somehow make this work. I have a igoogle style content with sortable widgets with this code HTML Header Widget Content widget Header Widget Content widget jQuery $ ( ".column" ). sortable ({ connectWith : '.column' , handle : '.box-header' , revert : 500 }); How do I get this work with cookie plugin? Thanks for your time and help. 回答1: First off, download the cookie plug-in (if you haven't already): http://plugins.jquery.com/project/cookie Next, read this short

Kendo sortable : cannot edit text input inside of the sortable table

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have following sortable table with sortable rows by using: http://demos.telerik.com/kendo-ui/sortable/events <tbody class = "playlist" kendo-sortable k-placeholder = "placeholder" k-hint = "hint" > <!-- IF NOTHING IS FOUND--> <tr ng-if = "projectDetail.projectOrderViewConfiguration.projectEntries.length == 0" > <td colspan = "9" ><h1> {{ 'ADD_SOME_ITEMS_FROM_LEFT_COLUMN' | translate }} </h1></td> </tr> <!-- ELSE WRITEOUT--> <tr ng-repeat = "projectEntry in projectDetail.projectOrderViewConfiguration.projectEntries" > <td> <input

jQuery UI Sortable Position

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How do I track what position an element is when its position in a sortable list changes? 回答1: You can use the ui object provided to the events, specifically you want the stop event , the ui.item property and .index() , like this: $("#sortable").sortable({ stop: function(event, ui) { alert("New position: " + ui.item.index()); } }); You can see a working demo here , remember the .index() value is zero-based, so you may want to +1 for display purposes. 回答2: I wasn't quite sure where I would store the start position, so I want to elaborate on

jqGrid: using beforeProcessing to populate filterToolbar selection boxes

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am populating three dropdown boxes in my filterToolbar with data from the server, shown in the declaration of prodValues, envValues, and typeValues below. I would like to change my code to perform this operation in the beforeProcessing event and pull the values from the main grid data dump. I already have the server sending what I think is the proper json response to do this: { "pVals":"Product1:Product1;Product2:Product2;etc:etc", "eVals":"??:??;Dev:Dev;PreProd:PreProd;Prod:Prod;Test/QA:Test/QA", "tVals":"??:??;App:App;Service:Service;SQL

拖拽插件SortableJS

时光毁灭记忆、已成空白 提交于 2019-12-02 02:49:33
在项目中,经常会遇到一些涉及到拖拽的需求,github上面有一个开源的 SortableJS 的插件,支持Vue,React,Angular等多种框架,实现效果很好,基本可以满足大部分的需求,下面就第一次在jquery中的使用做个简单的demo记录。 引入文件Sortable.min.js 指定包裹容器的id 根据api开始创建使用即可 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Sortable. No jQuery.</title> <link href="st/app.css" rel="stylesheet" type="text/css" /><!--可去掉,不影响功能--> </head> <body> <div class="container" style="height: 520px"> <div data-force="30" class="layer block" style="left: 14.5%; top: 0; width: 37%"> <div class="layer title">List A</div> <ul id="foo" class="block__list block__list_words"> <li>1aaaбегемот测试</li> <li

vue 表格 排序

依然范特西╮ 提交于 2019-12-01 04:53:26
sortable 排序 <el-table-column prop="for_time" label="变动时间" width="180" sortable></el-table-column> 来源: https://www.cnblogs.com/lei0913/p/11655807.html