0
function test()
{
    //load some data through ajax call 
    html = '<a rel="facebox_edit" href="www.google.com">abc</a>';
    $('#id_fv').html(html);
}

jQuery(document).ready(function($) {
                $('a[rel*=facebox_edit]').facebox({
                    loadingImage : full_path+'images/loading.gif',
                    closeImage   : full_path+'images/closelabel.png'
                });
            });

在正文加载时,我调用函数 test(),现在当我单击链接时,它直接转到 www.google.com 页面,而不是在 Facebook 中加载它。如何解决?

4

1 回答 1

0

这样写。。

function test()
{
    //load some data through ajax call 
    html = '<a rel="facebox_edit" href="www.google.com">abc</a>';
    $('#id_fv').html(html);
}

jQuery(document).ready(function($) {
                test();
                $('a[rel*=facebox_edit]').facebox({
                    loadingImage : full_path+'images/loading.gif',
                    closeImage   : full_path+'images/closelabel.png'
                });
            });
于 2012-09-24T06:56:40.103 回答