Jump to content

Recommended Posts

Posted

Boas ppl estou a ter um pequeno problema na integração do colorbox, então é o seguinte, tenho um código que me carrega os dados para dentro de uma lista, depois de os dados carregados poderei clicar no titulo da mesma para editar, o formulário de edição esta a ser carregado pelo plugin colorbox, ate aqui tudo bem, depois de fechar o colorbox ele recarrega os dados outra vez, e se for tentar editar outro item ele não deixa da este erro:

$.colorbox is not a function
[Parar Neste Erro] onClosed: function () { 

o meu codigo actual é este:

$("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();
        }
    });
});

Esta aqui um vídeo com o erro 😛

https://www.youtube.com/embed/AXOG5nec8_M?feature=oembed

Cumprimentos

Posted

Ja resolvi o problema, na pagina que tinha o conteúdo tinha la uma tag de script a puxar o jquery e tava a limpar o dom todo ja corrigi obrigado pela ajuda 😄

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.