Dialog auto width

Dialog auto width

Dear,

I'm new to jQuery UI and i want to use the dialog box. But i ran into a problem.
I want to change the standard width value to be "auto", but for some reason this doesn't work.
(I change it in the following function)
  1. $.widget( "ui.dialog", {
  2. version: "1.10.0",
  3. options: {
  4. appendTo: "body",
  5. autoOpen: true,
  6. buttons: [],
  7. closeOnEscape: true,
  8. closeText: "close",
  9. dialogClass: "",
  10. draggable: true,
  11. hide: null,
  12. height: "auto",
  13. maxHeight: null,
  14. maxWidth: null,
  15. minHeight: 150,
  16. minWidth: 150,
  17. modal: false,
  18. position: {
  19. my: "center",
  20. at: "center",
  21. of: window,
  22. collision: "fit",
  23. // Ensure the titlebar is always visible
  24. using: function( pos ) {
  25. var topOffset = $( this ).css( pos ).offset().top;
  26. if ( topOffset < 0 ) {
  27. $( this ).css( "top", pos.top - topOffset );
  28. }
  29. }
  30. },
  31. resizable: false,
  32. show: null,
  33. title: null,
  34. width: 700,

  35. // callbacks
  36. beforeClose: null,
  37. close: null,
  38. drag: null,
  39. dragStart: null,
  40. dragStop: null,
  41. focus: null,
  42. open: null,
  43. resize: null,
  44. resizeStart: null,
  45. resizeStop: null
  46. },
I always have to set the width to false in the following function.
  1. $(function(){
  2. $( "#dialog" ).dialog({
  3. autoOpen: true,
  4. modal: true,
  5. draggable: false
  6. });
  7. });
Nor does anything happen when I want to edit the height, resizable and the other options. 

But what am i doing wrong?
Do I have to change it somewhere else?
Thanks in advance guys