jquery-ui-selectable

Fill jQuery UI selectable by AJAX call

狂风中的少年 提交于 2020-03-26 06:51:34
问题 I am working on filling a jQuery selectable via AJAX call. I have prepared server side API, which has been tested will return serialized jason object. I have declared the selectable at client side <ol id="selectable"></ol> Then I have a button will trigger the AJAX call to get data. $.ajax({ url: '/api/XXX/XXX, contentType: "application/json; charset=utf-8", dataType: "json", //error: OnAjaxError, success: function (data) { } }); button.onclick = function () { $("#selectable").selectable({ /

jQuery UI Selectable Without Selection Box

穿精又带淫゛_ 提交于 2020-01-02 17:16:55
问题 Given this example here: http://jqueryui.com/selectable/#display-grid I would like to make a selection without the "selection box" that appears when you click 'n drag. Namely, when I click on number 5 and drag to number 6 and then to 10 I get this: where in fact what i would like to is drag from 5 to 6 to 10 and have only them selected without 9. I searched the docs and couldn't find that option, and my google skills didn't bring me any luck, and I thought this must have been already done it

Propagation Issue In Nested Jquery Ui Selectable

橙三吉。 提交于 2019-12-29 08:25:07
问题 Problem is: In nested jQuery Ui selectable, selecting top most child of context means when I click on Item 1 it select Item 1, but when I click on Item 111 or 1111 it select until Item 2 while I need only the element on which focus is, not it's parent until mouse focus on that. Please keep in mind that there might be any pure html just not limited to ul, li, it is for illustrative purpose only. <ul id="selectable"> <li>Item 1</li> <li>Item 2 <ul > <li>Item 11 <ul > <li>Item 111</li> <li>Item

Is there a way to change event parameters in jQuery?

旧时模样 提交于 2019-12-29 07:07:12
问题 I want to be able to change the parameters that are being passed into the selectable's start event, so I can basically allow my user to use the selectable jQuery UI effect without having to hold down the CTRL key. JS $(function() { $( "#selectable" ).bind("mousedown", function(event, ui) { var result = $( "#select-result" ).empty(); event.metaKey = event.ctrlKey = true; }); $( "#selectable" ).selectable(); }); I have a fiddle with what I'm trying to accomplish here: http://jsfiddle.net

Why the jQuery Selectable plugin doesn't work with a foreach generated list?

旧时模样 提交于 2019-12-24 06:59:20
问题 I am currently working on an MVC project and implemented jQuery Selectable plugin. I have a string in my model which I have Split() as below in my view: @{ var size = Model.AvailableSizes.Split(','); foreach (var item in size) { <ol class="ui-selectable" id="selectable"> <li class="ui-selectable">@item</li> </ol> } } Here is the static script defined in my view: <script type="text/javascript"> $(document).ready(function () { $("#selectable").selectable(); }); </script> The selectable jQuery

Why the jQuery Selectable plugin doesn't work with a foreach generated list?

旧街凉风 提交于 2019-12-24 06:59:07
问题 I am currently working on an MVC project and implemented jQuery Selectable plugin. I have a string in my model which I have Split() as below in my view: @{ var size = Model.AvailableSizes.Split(','); foreach (var item in size) { <ol class="ui-selectable" id="selectable"> <li class="ui-selectable">@item</li> </ol> } } Here is the static script defined in my view: <script type="text/javascript"> $(document).ready(function () { $("#selectable").selectable(); }); </script> The selectable jQuery

Disabling ctrl-click on jquery ui selectable

好久不见. 提交于 2019-12-22 04:01:08
问题 I was wondering if there is an option on the jQuery UI Selectable that will let me disable the Ctrl +Click, but still keep the draggable for the multiple selection. On my project I want to be able for people to select multiples, but only by dragging, not by Ctrl +clicking. If there isn't, does anyone know a way I can achieve this? Any information would be really helpful! :) Thanks!!! 回答1: Selectable uses the metaKey flag to do multi-select, so you can bind metaKey to be false on the mousedown

Enable Shift-Multiselect in jQuery UI Selectable

雨燕双飞 提交于 2019-12-17 22:46:15
问题 I want to enable multiselect capabilities in a jQuery UI Selectable table by holding shift . I probably should do something like this if shift is held down on mouseclick Get topmost selected element Get clicked element Select all elements in between but i can't find how to do this in a clean way... At the moment i got this inside the selectable configuration: start: function(e) { var oTarget = jQuery(e.target); if(!oTarget.is('tr')) oTarget = oTarget.parents('tr'); } So oTarget is the clicked

JQuery UI selectable plugin - Multiple mouse drag selection and unselect option

余生长醉 提交于 2019-12-11 04:06:01
问题 I am using the JQuery UI selectable plugin to select table cells, here is the example code: http://jsbin.com/ejewes/edit#javascript,html,live I want to make changes to this so that I am able to 1. do multiple mouse drag selects (without using the ctrl key) 2. deselect cells by drag or click on single/multiple selected cells I went through related questions on this forum, but no solution has worked for me so far! Can anybody please help me customize this plugin or point me to some resource

How to select all divs that overlay with a draggable div in jquery?

我的未来我决定 提交于 2019-12-08 13:44:46
问题 I'm building a graph displaying events happening over time. Each of my event is an horizontal bar that is created using a <div> as shown below: <div class="aaaa" style="margin-left: 0.00%; width:100.00%;">aaaa</div> <div class="aaaa" style="margin-left: 5.00%; width: 20.00%;">bbbb</div> <div class="aaaa" style="margin-left:25.00%; width: 50.00%;">cccc</div> <div class="aaaa" style="margin-left:55.00%; width: 45.00%;">dddd</div> At the top of this graph, I have a "ruler" which is a draggable