use-ajax class link not working when i load new content using custom ajax code, which has the use-ajax class links.
I use normal jquery ajax to load the content because, i have drag and drop functionality which use ajax to load new content
i tried a lot but didn’t get the idea why it is not working
Thanks in advance
jQuery(".clips-list .section-add-clip").droppable({ accept: '.mysrapbook-clip-drag', hoverClass: "ui-state-active", drop: function(event, ui) { var source_url = ui.draggable.find('a').attr('rel'); var destination_url = jQuery('.scrapbook-mongo-id').data('scrapbooid'); var section_idx = Number(jQuery(this).attr('rel')); var ul_container = jQuery(this).parent().parent().find('li.clips-inner'); var post_data = { source_url: source_url, destination_url: destination_url, idx: section_idx, load_node: 1, index_countr: ul_container.length }; var ajax_data = jQuery(this); //call ajax to save clip to haggadah jQuery.ajax({ url: "/clip-to-page", data: post_data, type: 'POST', success: function(data) { //console.log(data); console.log(data); if (data[1].data != "") { ul_container.last().after('<li class="clips-inner clip-idx-' + post_data.idx + '-id-' + post_data.index_countr + '">' + data[1].data + '</li>'); } } }); } });
here is the code where i fire ajax to load new content and that content has ‘use-ajax’ class link which is not working it works fine page page is loaded