Hello ppl我在集成colorbox時遇到了一些問題,然後是這樣的,我有一個代碼將數據加載到列表中,數據加載後我只需點擊標題進行編輯,通過這個插件顏色框加載編輯形式到這裏沒事,關閉它再重新加載數據的顏色框後,如果您嘗試編輯另一個項目他不會讓這樣的錯誤:jQuery e ColorBox
$.colorbox is not a function
[Parar Neste Erro] onClosed: function() {
我當前的代碼是這樣的:
$("a[href*='#tabsDadosSoftware']").click(function() {
CarregarDadosSoftware();
});
function CarregarDadosSoftware() {
$.ajax({
url: 'ajax/Software.php',
cache: false,
data: "acc=Visualizar&idpc=<?php echo (int)$_GET["id"]; ?>",
type: 'GET',
contentType: "application/x-www-form-urlencoded; charset=utf-8",
beforeSend: function() {
$('div#ListagemSoftware > div.Informacoes .load').show();
$('div#ListagemSoftware > div.Informacoes > ul').html("");
},
success: function (result) {
$('div#ListagemSoftware > div.Informacoes .load').hide();
$('div#ListagemSoftware > div.Informacoes > ul').html(result)
}
});
}
$("div#ListagemSoftware > div.Informacoes > ul > li > .titulo").live('click', function() {
var IDSoftware = $(this).parent().attr("id");
$.colorbox({
href: "ajax/Software.php?acc=Editar&idpc=<?php echo (int)$_GET["id"]; ?>&id="+IDSoftware,
onClosed: function() {
CarregarDadosSoftware();
}
});
});
現在在YouTube上留下一個視頻與錯誤演示
http://www.youtube.com/watch?v=AXOG5nec8_M
問候