i have dropped the elements in the page. now i have to edit it. like i drag element from widget and drop in the page. after drop when i select the element it selected. can i edit its name like div.<div class="inputBoxItem-label">Text </div>.
i want to change the div name text to text1 after dropped. how can be it possiible in jquery.
here is my code..
jQuery('.ui-layout-center').droppable({
activeClass: 'ui-state-hover',
accept: '.item-art',
revert: true,
drop: function (event, ui) {
var $canvas = jQuery(this);
if(!ui.draggable.hasClass('canvas-element')) {
var $canvasElement = ui.draggable.clone().text('dropped');
$canvasElement.addClass('canvas-element');
$canvas.append($canvasElement);
Call
$canvasElement.html('Text1')before calling$canvas.append($canvasElement);