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() を呼び出します。リンクをクリックすると、facebox にロードするのではなく、直接 www.google.com ページに移動します。それを解決する方法?

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 に答える