开发者

Anobody succeeded in using ICEFaces with jQuery?

Basically jquery is usable wit开发者_JS百科h IceFaces. Then only problem arises when partial updates of the page are used. For example you have a panelgroup where a jquery datepicker element (jquery UI datepicker plugin) is used.

If the panelGroup is visible from the beginning it's no problem. The jquery call to jQuery(".datepicker").datepicker finds the input and jquery can do it's magic.

But if the panelGroup is shown because of a partial update of the page (because the visible propery is changed) jquery is not called again.

Does anybody has a solution to this problem?

Basically the idea would be that jquery is run each time the dom has changed.


I have found an answer at least for the datepicker, just use the .live (jquery 1.3+) like in this example:

jQuery(function(){
    jQuery('.datepicker').live('click', function() {

        jQuery(this).datepicker({ dateFormat: 'yy-mm-dd', gotoCurrent:true, showOn:'focus' }).focus();
    });
});

Solution was found here: http://www.vancelucas.com/blog/jquery-ui-datepicker-with-ajax-and-livequery/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜