Strange jQueryUI dialog error


Strange jQueryUI dialog error



I have dialog created like this

$('#add_error').click(function(e) {         $('<div>')             .load('/someaction/format/html/')             .dialog({                 title: 'Some title',                 modal: true,                 width: 385,                 close: function() {                      $(this).remove();                 }             });          e.preventDefault();     }); 

It works ok, but every third (not really sure if its really third) time I click link to open dialog, it fails with error in firebug

"$("").addClass("ui-widget-overlay") is undefined"

In dialog.js that is piece of code:

var $el = (this.oldInstances.length ? this.oldInstances.splice(0, 1)[0] : $('<div></div>').addClass('ui-widget-overlay'))                 .appendTo(document.body)                 .css({                     width: this.width(),                     height: this.height()                 }); 

under create: function(dialog) method.

Strange thing is that this error does not occur when I remove

close: function() {                      $(this).remove();                 } 

Any idea?




Duplicate Id. JSF

1:



tool or plugin available to convert HTML to JSF tags


Disable commandButton in JSF


Caching instances in a Java EE web app

2:



JSF datascroller problem
I think it got to be connected to the: ui-widget-overlay in some strange way..
JSF - Update model in invoke application phase
I just override it in my page like this: .ui-dialog-titlebar { display: none; } .ui-widget-overlay { background: #888888; opacity:.15;filter:Alpha(Opacity=15); } . and the reason to override ui-widget-overlay is just because the following doesn't work .ui-dialog-overlay { background: #888888; opacity:.15;filter:Alpha(Opacity=15); }.


3:


Everithing works with jQuery UI 1.8.



59 out of 100 based on 54 user ratings 379 reviews

@