Questions tagged [jquery-ui]

jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.

jQuery UI is a jQuery library that provides abstractions for low-level interaction and animation, advanced effects and high-level, theme-able widgets, built on top of the JavaScript Library. You can use it to build highly interactive web applications.

Latest stable version:

Resources:

Best Practices and Commonly Made Mistakes:

  • Remember to include the jQuery file reference before the jQuery-UI file.

Stack Snippet Starter Pack

<link href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.css" rel="stylesheet"/>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.js"></script>

Related Tags

39788 questions
163
votes
6 answers

jQuery check if an input is type checkbox?

I'd like to find out if an input is a checkbox or not, and the following doesn't work: $("#myinput").attr('checked') === undefined Thank you once again!
Rio
  • 14,182
  • 21
  • 67
  • 107
163
votes
13 answers

jquery UI Sortable with table and tr width

I am using jQuery UI sortable to make my table grid sortable. The code seems to work fine but because I am not adding width to tds, when I drag the tr it shrinks the content. For example; if my table row is 500px when I start dragging, it becomes…
ntan
160
votes
30 answers

Prevent jQuery UI dialog from setting focus to first textbox

I have setup a jQuery UI modal dialog to display when a user clicks a link. There are two textboxes (I only show the code for 1 for brevity) in that dialog div tag and it is changed to be a jQuery UI DatePicker textbox that reacts on focus. The…
slolife
  • 19,520
  • 20
  • 78
  • 121
159
votes
13 answers

jQueryUI Tooltips are competing with Twitter Bootstrap

I have been able to get some tool tips to work finally with the following code: Hover over me and then The problem I'm running into is…
markdotnet
  • 2,496
  • 2
  • 19
  • 12
154
votes
9 answers

keycode 13 is for which key

Which is the key on the keyboard having the keycode as 13? switch(key) { case 37: $.keynav.goLeft(); break; case 38: $.keynav.goUp(); break; case 39: $.keynav.goRight(); break; case 40: $.keynav.goDown(); …
Roadrunner
  • 1,623
  • 2
  • 11
  • 7
153
votes
24 answers

How to implement "confirmation" dialog in Jquery UI dialog?

I am try to use JQuery UI Dialog to replace the ugly javascript:alert() box. In my scenario, I have a list of items, and next to each individual of them, I would have a "delete" button for each of them. the psuedo html setup will be something…
xandy
  • 27,357
  • 8
  • 59
  • 64
153
votes
4 answers

jQuery UI Sortable Position

How do I track what position an element is when its position in a sortable list changes?
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
145
votes
14 answers

How can I disable a button on a jQuery UI dialog?

How do I go about disabling a button on the jQuery UI dialog. I can't seem to find this in any of the documentation in the link above. I have 2 buttons on the modal confirmation ("Confirm" and "Cancel"). In certain cases, I want to disable the…
leora
  • 188,729
  • 360
  • 878
  • 1,366
139
votes
7 answers

How to completely remove a dialog on close

When an ajax operation fails, I create a new div with the errors and then show it as a dialog. When the dialog is closed I would like to completely destroy and remove the div again. How can I do this? My code looks something like this at the…
Svish
  • 152,914
  • 173
  • 462
  • 620
138
votes
15 answers

Limit results in jQuery UI Autocomplete

I am using jQuery UI Autocomplete. $("#task").autocomplete({ max:10, minLength:3, source: myarray }); The max parameter doesn't work and I still get more than 10 results. Am I missing something?
santhosh
  • 1,894
  • 3
  • 18
  • 23
138
votes
1 answer

How do I keep jQuery UI Accordion collapsed by default?

I am working with jQuery UI Accordion and it works great, but I would like to have the accordion stay closed unless it I click on it. I am using this code right now, which allows be to toggle it closed: $("#accordion").accordion({ header: "h3",…
forrest
  • 10,570
  • 25
  • 70
  • 132
137
votes
14 answers

Automatically resize jQuery UI dialog to the width of the content loaded by ajax

I'm having a lot of trouble finding specific information and examples on this. I've got a number of jQuery UI dialogs in my application attached to divs that are loaded with .ajax() calls. They all use the same setup call: …
womp
  • 115,835
  • 26
  • 236
  • 269
135
votes
13 answers

jQuery UI datepicker change event not caught by KnockoutJS

I'm trying to use KnockoutJS with jQuery UI. I have an input element with a datepicker attached. I'm currently running knockout.debug.1.2.1.js and it seems that the change event is never being caught by Knockout. The element looks like this:
Jose
  • 10,891
  • 19
  • 67
  • 89
135
votes
7 answers

Testing if jQueryUI has loaded

I'm trying to debug a website, and I think that jQueryUI may not have loaded properly. How can I test if jQueryUI has loaded?
waiwai933
  • 14,133
  • 21
  • 62
  • 86
134
votes
7 answers

Make JQuery UI Dialog automatically grow or shrink to fit its contents

I have a JQuery UI dialog popup that displays a form. By selecting certain options on the form new options will appear in the form causing it to grow taller. This can lead to a scenario where the main page has a scrollbar and the JQuery UI dialog…
MikeN
  • 45,039
  • 49
  • 151
  • 227