开发者

jQuery dialog does not appear on second attempt if using a custom theme

开发者 https://www.devze.com 2022-12-20 22:42 出处:网络
I am using a jQuery dialog with autoOpen set to false.The first time I call dialog(\"open\") it works fine.However, subsequent calls (without a page refresh) do not show the dialog.

I am using a jQuery dialog with autoOpen set to false. The first time I call dialog("open") it works fine. However, subsequent calls (without a page refresh) do not show the dialog.

This problem apparently started when I switched from using jquery.ui.dialog.js, jquery.ui.resizable.js, 开发者_运维技巧jquery.ui.draggable.js, and jquery.ui.core.js to a custom theme which bundled all of those into jquery-ui-1.7.2.custom.min.js. I pretty much confirmed that the custom theme was the problem by switching back to my old js files.

My custom theme was far from custom as I took all of the defaults (simply went to http://jqueryui.com/themeroller/ and clicked download).

I am using version 1.4.1 of jQuery.

Any ideas? I'd like to continue using the themeroller, but may have to punt.


Two things are possible here:

The first: jQuery 1.4 doesn't play well with jQuery UI 1.7.2 in all cases...namely that effects that involve widget elements end up destroying them (which sounds like your case). If you say fadeOut a window, etc, it can get destroyed. The current recommendation is to use jQuery 1.3.2 with jQuery UI 1.7.2, and wait for jQuery UI 1.8 for jQuery 1.4+ (UI 1.8 is currently in RC2 status, should be out any day now)

The second, if the first doesn't apply: You may want to try and just go download the theme again. There were some bad zips coming off theme roller, the jQuery infrastructure team took it offline and fixed it, it's now restored. Depending on when you grabbed your zip, it may have been affected.

Here's the jQuery UI blog post detailing it

As a side note, if you cut down just to save on bandwidth, Google CDN hosts the jQuery UI library as well, you can pull it from there.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号