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页面,而不是将其加载到facebox中。怎么解决呢?
答案 0 :(得分: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'
});
});