开发者

jQuery UI Datepicker inside a Thickbox

I have the following markup and JS on a web page: http://jsfiddle.net/R2Jj2/

It seems to work well.

When I open th开发者_JS百科is content in a thickbox window the datepicker fails to load properly.

Any idea how I can get the datepicker to work?


The datepicker isn't working correctly because it's probably calling stuff within the onLoad function. Try Colorbox.js, it has an onComplete specifically for handling this.

http://colorpowered.com/colorbox/

JavaScript/jQuery is not working inside of ColorBox.

This is often due to trying to access an element before it has been loaded into the document and can be resolved by moving the JavaScript into ColorBox's onComplete callback.

Example (using jQuery Forms plugin): $('#login_window').colorbox({onComplete:function(){ $('form#login').ajaxForm(); }});

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜