i have problem with using getJSON using a dynamically created element ,i create a code to add links to the page using jquery, and i can handle their events , their events works fine except for getJSON here's the code :
$('body').on('click', '.save-part', function(e) {
var csid = $('#id').val();
var element = $(this).parent().find('.part_id');
$.getJSON('operations/add.service.php',{csid:x1,part_title:x2},function(data){
element.text(data);
$('.add-lesson').show();
});
return false;
});
Aucun commentaire:
Enregistrer un commentaire