jquery-ui

jQuery-ui slider animation when setting value programmatically

落爺英雄遲暮 提交于 2020-02-04 05:44:07
问题 I'm using a jQuery-ui slider and some buttons for a quick selection of a little set of values. When the user clicks one of these buttons, the slider is set to the corresponding value through the .slider method: $("#mySlider").slider("value", myValue); This works fine, but I'd like to see the sliding animation. I tried with $("#mySlider").slider({value:myValue, animate:true}) but it doesn't work as expected, since the animation is only enabled when, later, the user clicks on the slider bar.

jQuery Autocomplete Plugin using Backbone JS

蓝咒 提交于 2020-02-03 10:19:29
问题 Let's suppose I want to use jQueryUi for implemeting autocomplete in a backboneView having a form. I implement the following code (*), but I don't like it because the fetching of the collection is performed also when the user does not type any letter. How should I perform the fetching collection only when the user starts to type something in the input box? var MyView = Backbone.View.extend({ initialize: function () { this.myCollection = new MyCollection(); this.myCollection.fetch(); // I

jQuery UI sortable - overlapping by 50% doesn't seem to work

醉酒当歌 提交于 2020-02-02 12:28:05
问题 jQuery UI sortable plugin is intended to enable a group of DOM elements to be sortable. A nice demo is at official website here The API documentation provides tolerance option, and the description says: Specifies which mode to use for testing whether the item being moved is hovering over another item. Possible values: intersect, pointer Furthermore, the description of intersect (which is default) states: intersect: The item overlaps the other item by at least 50%. I expected, that if I drag

Jquery UI droppable

安稳与你 提交于 2020-02-02 07:17:25
问题 Is Jquery UI droppable able to interact with files inside computer? Lets say I have an image file on my pc not inside the webpage where I try to drop on it and trigger a simple alert to notify. Is that possible with just Jquery UI ? 回答1: For what you described, use HTML 5 Drag & Drop instead. To answer your question, I don't believe JQuery UI allows you to do this. 来源: https://stackoverflow.com/questions/5612250/jquery-ui-droppable

Jquery UI droppable

梦想与她 提交于 2020-02-02 07:16:16
问题 Is Jquery UI droppable able to interact with files inside computer? Lets say I have an image file on my pc not inside the webpage where I try to drop on it and trigger a simple alert to notify. Is that possible with just Jquery UI ? 回答1: For what you described, use HTML 5 Drag & Drop instead. To answer your question, I don't believe JQuery UI allows you to do this. 来源: https://stackoverflow.com/questions/5612250/jquery-ui-droppable

Jquery UI droppable

余生长醉 提交于 2020-02-02 07:15:38
问题 Is Jquery UI droppable able to interact with files inside computer? Lets say I have an image file on my pc not inside the webpage where I try to drop on it and trigger a simple alert to notify. Is that possible with just Jquery UI ? 回答1: For what you described, use HTML 5 Drag & Drop instead. To answer your question, I don't believe JQuery UI allows you to do this. 来源: https://stackoverflow.com/questions/5612250/jquery-ui-droppable

updated UI not showing before sync ajax call

梦想的初衷 提交于 2020-01-30 13:18:09
问题 I Have a 2 JavaScript functions what call one after another. like following. updateUI(event); syncCall(); function updateUI(event) { formSubmitBtn = $(event.target).find('[type=submit]:not(".disabled")'); formSubmitBtn.attr('disabled', 'disabled'); var loadingText = I18n.t('Submitting'); formSubmitBtn.val(loadingText).text(loadingText); } function syncCall(){ $.ajax({ async: false, dataType: 'json', type: 'GET', url: '/calls/synccall', success: function (json) { userIsSignedIn = json.is

updated UI not showing before sync ajax call

懵懂的女人 提交于 2020-01-30 13:15:11
问题 I Have a 2 JavaScript functions what call one after another. like following. updateUI(event); syncCall(); function updateUI(event) { formSubmitBtn = $(event.target).find('[type=submit]:not(".disabled")'); formSubmitBtn.attr('disabled', 'disabled'); var loadingText = I18n.t('Submitting'); formSubmitBtn.val(loadingText).text(loadingText); } function syncCall(){ $.ajax({ async: false, dataType: 'json', type: 'GET', url: '/calls/synccall', success: function (json) { userIsSignedIn = json.is

How do I solve this jQuery plugins conflict?

柔情痞子 提交于 2020-01-30 11:56:47
问题 I am using two different jQuery plugins; one for news logo ticker and another for horizontal text slider. but only one of them is working at a time when when used in single page may be because of jQuery conflict.. If I comment first plugin second plugin works fine and vice verse. Here is the code: <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.newsticker.js"></script> <script type="text/javascript"> jQuery(document).ready( function()

How to addClass('ui-state-error') to a <select> styled with selectmenu, dropkick and/or chosen plugin?

老子叫甜甜 提交于 2020-01-30 10:58:25
问题 There are a few plugins ( selectmenu, dropkick, chosen, and probably many more ) that turn tag combo-box into a prettier, styled, more functional version. I'd like to style the extended tag with ui-state-error style. This sporadically works sometimes, but most of the time it doesn't: $('select').selectmenu().addClass('ui-state-error'); And even when it works, removeClass('ui-state-error') doesn't work. So, what is the correct way to addClass('ui-state-error') to one of these extended combo