conflict between jquery ui and jequery

0

I have a problem, I am making a system and parts of the code that jquery ui uses do not work together with jquery. As I can avoid that conflict, the parts of jquery that are giving me a problem are in some modal windows that shows a form to edit data. When making the call

<a class="btn btn-sm btn-primary" href="javascript:void(0)" title="Edit" onclick="edit_categ('."'".$categ->id."'".')"><i class="glyphicon glyphicon-pencil"></i> Edit</a>

does not load the modal, if I remove the jquery ui if it loads, but I need the jquery ui for other parts where I do autocomplete and others modal too.

    
asked by Francisco 30.12.2017 в 17:39
source

1 answer

0

Yes of course it is

 function edit_categ(id)
 {
save_method = 'update';
$('#form')[0].reset(); 
$('.form-group').removeClass('has-error'); 
$('.help-block').empty(); 


$.ajax({
    url : "<?php echo site_url('categorias/ajax_edit/')?>/" + id,
    type: "GET",
    dataType: "JSON",
    success: function(data)
    {

        $('[name="id"]').val(data.id);
        $('[name="nombre"]').val(data.nombre);
        $('[name="familia"]').val(data.familia);
        $('#modal_form').modal('show'); 
        $('.modal-title').text('Editar categoria'); 

    },
    error: function (jqXHR, textStatus, errorThrown)
    {
        alert('Error ');
    }
});

} I'm doing it with codeigniter. the versions I'm using are jquery ui v1.12.1 and jquery min v3.2.1

    
answered by 30.12.2017 в 20:23