subjx
subjx copied to clipboard
Can we add new div while first time onMove() method?
subjx('.clone').clone({
stack: '#container',
appendTo: '#stack',
onInit(el) {
},
onMove(dx, dy) {
},
onDrop(e, el, clone) {
},
onDestroy() {
}
});
when onMove method starts, can we change the style of div or can we change the div on the fly?
suppose below is the HTML initial element which is drags
<div class='clone clonable'>Start Drag</div>
and when onMove() method start, i want to edit the above HTML like this.
<div class='clone clonable'>
<img id="signature-LDNRHuZkQx" style="background: rgb(255, 214, 91); opacity: 0.8; border: 1px solid rgb(255, 255, 118); border-radius: 5px; width: 400px; height: 100px">
</div>
@nichollascarter @semantic-release-bot @fatihkutuk @sysmaya
@sraza295 you can access to the elements within onInit
or onMove
methods:
subjx('.clone').clone({
stack: '#container',
appendTo: '#stack',
onInit(elements) {
console.log(elements);
},
onMove(dx, dy) {
console.log(this.elements);
}
});