I write a function so that when you click on an element, it becomes extensible.

$(".newElement").on('dblclick', function () { $(this).resizable({containment: "#contener"}); }); 

here everything works, but how to make it so that with a single click it stops being stretched?

 $(".newElement").click(function () { $(this)??????; }); 

Who knows how to add the following function?

    1 answer 1

      $(this).resizable('destroy'); 
    • or maybe tell me how to make the frame stop after the stretching has been stopped and the removal is done by clicking on the $ (". newElement") element. on ('dblclick', function () {$ (this) .css ({'border': '2px dotted # 000000'});}); $ (". newElement"). click (function () {$ (this) .css ({'border': 'none'});}); // show a cross with a double click on the element $ (". newElement"). on ('dblclick', function () {$ (this) .find ('. delete'). fadeIn (100);}); - dmivasant