Hello
I am working on drag drop application in ionic. I am using jQuery UI for drag and drop events.
<li on-hold="longPressed($event )" on-double-tap="onDoubleTap(item)" data-zone="z1" data-id="{{item.id}}" class="listitem" ng-click="z1ElementClicked(item)" ng-repeat="item in handle.z1level" jqyoui-droppable="{onDrop : 'onDropp(event , ui)' }" data-drop="true" class="btn btn-primary" data-drag="false" data-jqyoui-options="{helper: 'clone', revert: 'invalid', appendTo: 'body'}" jqyoui-draggable="{onDrag : 'onDragg(event)' , animate:true}" ><a>{{item.name}}</a></li>
This is my element i am dragging what i want is when user long press on screen i want data-drag=“false” change to data-drag=“true”
$scope.longPressed = function(event){
console.log($(event.target).parent().data("drag"));
$(event.target).parent().data("drag" , "true");
console.log($(event.target).parent().data("drag"));
}
I am using this code to change the attributes and its working fine but problem is my element is not dragging even after i have changed the attributes is there any way of reloading dom after changing element attribute.?