0

我有这个功能代码:

jQuery("#Zone__" + row + "__documents").find("td:eq(3)").mouseover(function(){
var text = jQuery("#Zone__" + row + "__documents").find("td:eq(3)").html();
if(text.indexOf("...") > 0){
    jQuery.post("/_common/cfc/act_get.cfc?method=getNcas&returnFormat=json",
        {document_id:doc_id,maxnum:100},
        function(res,code){
            alert(res);
        },
        "json"
    );
     }
});

现在,我想打开 jquery 插件“jqmodal”,而不是警报,其中的数据来自其中的帖子(res)。有人可以帮我实现这一目标吗?

提前谢谢你,米歇尔

4

1 回答 1

0

不熟悉该插件,但通过快速阅读文档,我希望它可以工作(假设您已经包含了所需的 .js/.css 资源:

<div class="jqmWindow" id="dialog"></div>

$(document).ready(function() {
    $('#dialog').jqm();

    jQuery("#Zone__" + row + "__documents").find("td:eq(3)").mouseover(function(){
    var text = jQuery("#Zone__" + row + "__documents").find("td:eq(3)").html();
    if(text.indexOf("...") > 0){
        jQuery.post("/_common/cfc/act_get.cfc?method=getNcas&returnFormat=json",
            {document_id:doc_id,maxnum:100},
            function(res,code){
                $('#dialog').html(res);
                $('#dialog').jqmShow();
            },
            "json");
         }
    });  
});
于 2011-09-29T16:27:04.987 回答