Jquery Draggable AND Resizable

前端 未结 6 525
终归单人心
终归单人心 2020-12-01 08:03
function makeResourceDrag(arrIndexID) {

    $(\'#imgA\' + arrIndexID).resizable();

    $(\'#imgA\' + arrIndexID).draggable({
        start: function(event, ui) {
          


        
6条回答
  •  悲&欢浪女
    2020-12-01 08:36

    Make sure jquery-ui.css is referenced in your project!

    Per this question: Resizable, draggable object in jquery. Possible? if you simply include jquery-ui.css it will work. It solved my problem when none of these did. My code is simple:

    $(element).resizable().draggable();
    

    This was draggable but not resizable. Nothing else worked. Adding the CSS allowed resizing with no extra divs or code.

提交回复
热议问题