How do I disable a jquery-ui draggable?
Could create a DisableDrag(myObject) and a EnableDrag(myObject) function myObject.draggable( ‘disable’ ) Then myObject.draggable( ‘enable’ )
Could create a DisableDrag(myObject) and a EnableDrag(myObject) function myObject.draggable( ‘disable’ ) Then myObject.draggable( ‘enable’ )
I must confess I use to put my parameters as query string parameters in the url : during init : url: ‘/upload.aspx?id=’+Id, or later : upldr.settings.url = upldr.settings.url + ‘&token=’ + myToken; It works fine. Hope this will help
I don’t like the solution of modifying the jQuery source code because it removes the ability to use a CDN. Instead, you can reassign the _gotoToday function by including this code based on @meesterjeeves answer somewhere in your page’s JavaScript scope file: $.datepicker._gotoToday = function(id) { var target = $(id); var inst = this._getInst(target[0]); if … Read more
I had a similar problem enabling a drag between two overflow-auto divs. With the help of the previous answers, I found that this combination works for me (Safari 5.0.3, jquery-1.4.4, jquery-ui-1.8.7): appendTo: ‘body’, containment: ‘window’, scroll: false, helper: ‘clone’
Check out jquery-ui-bootstrap. From the README: Twitter’s Bootstrap was one of my favorite projects to come out of 2011, but having used it regularly it left me wanting two things: The ability to work side-by-side with jQuery UI (something which caused a number of widgets to break visually) The ability to theme jQuery UI widgets … Read more
Here you go. It’s a little messy but it works. $(function () { var companyList = $(“#CompanyList”).autocomplete({ change: function() { alert(‘changed’); } }); companyList.autocomplete(‘option’,’change’).call(companyList); });
You could write a custom binding that sets the date in the field using the datepicker APIs and also sets the value of your observable by reading the date properly. The custom binding might look like: ko.bindingHandlers.datepicker = { init: function(element, valueAccessor, allBindingsAccessor) { var options = allBindingsAccessor().datepickerOptions || {}, $el = $(element); //initialize datepicker … Read more
What version of jQuery-UI are you using? I’ve tested the following with 1.6r6, 1.7 and 1.7.1 and it works: //Set DatePicker to October 3, 2008 $(‘#dateselector’).datepicker(“setDate”, new Date(2008,9,03) );
You don’t have to change it in the jquery-ui css file (it can be confusing if you change the default files), it is enough if you add div.ui-datepicker{ font-size:10px; } in a stylesheet loaded after the ui-files div.ui-datepicker is needed in case ui-widget is mentioned after ui-datepicker in the declaration
It looks like writing to the widget to .data(“dialog”) and then trying to operate on it is causing an issue. Here is a sample where .data is not used and the open/close is called based on the element: http://jsfiddle.net/rniemeyer/durKS/ Alternatively, I like to work with the dialog in a slightly different way. I like to … Read more