I have an object that can be updated from a drag-drop interaction with a grid-stack object ( link ). Depending on the update of the object (change of position) an attribute of it is modified. How can I capture the modifications of this specific object. Taking into account only the attribute change.
I can capture the object if the user clicks on it with the "click" event.
$("div.container-fluid").on("click", "div.grid div#view", function() {
console.log(this);
});
The object to be fetched is in the DOM:
<div data-gs-x="0" data-gs-y="0" data-gs-width="4" data-gs-height="4" class="grid-stack-item ui-draggable ui-resizable ui-resizable-autohide"> </div>
The attributes that are modified are: data-gs-y="0" data-gs-width="4". These attributes are changed by a drag drop interaction of the grid-stack component.
Some doubts: Is there an event that captures the click and drag via mouse? Or does gridStack itself have? (I did not find anything in the documentation). Or can you monitor changes (of attributes) in DOM objects automatically?