I am looking for a way to save elements found within a div with the specific id.
Ideally I would want to save their id`s only and the order they appear in a div. They are copied over using dragula library.
My JS that got me nowhere:
dragula([document.querySelector('.container1'), document.querySelector('.container2')], {
copy: function (el, source) {
return source === document.querySelector('.container1')
},
accepts: function (el, target) {
return target !== document.querySelector('.container1')
},
removeOnSpill: true
});
var findId = $('.container2').find(id^=n);
$('.showMeId').append(findId);
Full, working example on codepen: https://codepen.io/anon/pen/NyBwOy