jquery-ui

jQuery Sortable - How to get current dragged element attribute

萝らか妹 提交于 2021-02-18 22:09:21
问题 I am using jqueryui sortable widget. I need to get the current dragged element's data attribues. $(this).data('attribute_name') is not working here. I have also tried some other methods, but not getting the correct result. HTML <ul class="draggable-item" style="min-height:10px;"> <li data-parent="31" data-id="81" class="ui-state-default">Label</li> <li data-parent="31" data-id="86" class="ui-state-default">Max Value</li> <li data-parent="31" data-id="83" class="ui-state-default">Unit</li> <li

jQuery Sortable - How to get current dragged element attribute

南笙酒味 提交于 2021-02-18 22:08:55
问题 I am using jqueryui sortable widget. I need to get the current dragged element's data attribues. $(this).data('attribute_name') is not working here. I have also tried some other methods, but not getting the correct result. HTML <ul class="draggable-item" style="min-height:10px;"> <li data-parent="31" data-id="81" class="ui-state-default">Label</li> <li data-parent="31" data-id="86" class="ui-state-default">Max Value</li> <li data-parent="31" data-id="83" class="ui-state-default">Unit</li> <li

jQuery Sortable - How to get current dragged element attribute

☆樱花仙子☆ 提交于 2021-02-18 22:08:29
问题 I am using jqueryui sortable widget. I need to get the current dragged element's data attribues. $(this).data('attribute_name') is not working here. I have also tried some other methods, but not getting the correct result. HTML <ul class="draggable-item" style="min-height:10px;"> <li data-parent="31" data-id="81" class="ui-state-default">Label</li> <li data-parent="31" data-id="86" class="ui-state-default">Max Value</li> <li data-parent="31" data-id="83" class="ui-state-default">Unit</li> <li

jQuery duplicate and drag an image

夙愿已清 提交于 2021-02-18 07:36:11
问题 I am trying to create a small application where a user can drag an image an move it around. I am using jQuery UI. I am able to create a clone but the drag stuff is not working. Also, when the clone is created it adds next to the "this" image. I want the clone and the original image to be on top of each other. So that the mousedown event creates a new image and makes it drag able, hence getting a clone effect. A demo is at http://www.kalomaya.com/dragable/index.html .draggable { float:left;

jQuery UI: moving items from one list to another

随声附和 提交于 2021-02-18 06:57:34
问题 While this should be relatively straightforward, I can't figure out how to move (rather than copy) LI elements between UL s. All I want is to drag any item from list foo to list bar (or vice versa) without duplicating the element. While connectToSortable does almost exactly what I want (though I'd prefer to avoid sortable ), it clones the element - and manually removing the original element by reacting to the stop event turns out to be not so easy (e.g. ensuring that a valid drop actually

jquery ui datepicker - how to set two min/max date restrictions in one datepicker?

陌路散爱 提交于 2021-02-17 05:15:03
问题 I am using the jquery ui datepicker with select date range. I know that by default it already set if the from picks a date then the to date can not pick any date before the from date picked. I also checked the minDate and maxDate documents but I still couldn't try figuring it out. I want to keep the default setting it has which is after date from is chosen date to cannot be before the from date vise versa but also want to add another restriction which is both datepickers have a maxDate of 0

jquery ui datepicker - how to set two min/max date restrictions in one datepicker?

我与影子孤独终老i 提交于 2021-02-17 05:14:12
问题 I am using the jquery ui datepicker with select date range. I know that by default it already set if the from picks a date then the to date can not pick any date before the from date picked. I also checked the minDate and maxDate documents but I still couldn't try figuring it out. I want to keep the default setting it has which is after date from is chosen date to cannot be before the from date vise versa but also want to add another restriction which is both datepickers have a maxDate of 0

jqueryui datepicker dd/MM/yy culture related issue

和自甴很熟 提交于 2021-02-16 08:47:22
问题 I'm using a jQueryUI datepicker for a simple "From" & "To" date range filter in my ASP.Net MVC web-app. Works fine until I hit a machine which had its datetime format (in the Regional Settings) set to "dd-MM-yy". In my controller I've a postback action which accepts a custom search object as a parameter which is then passed to the search function. This custom object has the properties for "To" & "From" dates and as usual the binding takes place automatically. Works normal on a machine with

jqueryui datepicker dd/MM/yy culture related issue

ぃ、小莉子 提交于 2021-02-16 08:46:12
问题 I'm using a jQueryUI datepicker for a simple "From" & "To" date range filter in my ASP.Net MVC web-app. Works fine until I hit a machine which had its datetime format (in the Regional Settings) set to "dd-MM-yy". In my controller I've a postback action which accepts a custom search object as a parameter which is then passed to the search function. This custom object has the properties for "To" & "From" dates and as usual the binding takes place automatically. Works normal on a machine with

Jquery ui datepicker preselect date that is not a sunday

帅比萌擦擦* 提交于 2021-02-11 15:11:38
问题 I have modified the jquery ui datepicker to pre-select the day that is 2 days from now and I have also disabled Sundays in the datepicker. However, the input field is still being pre-filled with the Sunday if the Sunday is 2 days from now. How do I prevent this? $(function() { $("#delivery-date").datepicker({ minDate: +2, maxDate: '+2M', dateFormat: "DD, d MM yy", showOn: "both", buttonText: "Change", beforeShowDay: function(date) { var day = date.getDay(); return [(day != 0), '']; } })