2013-10-23 149 views

回答

3

为什么不调整图像大小后的文件已经准备好,然后套用调整大小功能:

$('#draggableHelper').draggable(); 

$(function(){ 
    $('#image').width(50); 
    $('#image').resizable(); 
}); 

例子:http://jsfiddle.net/8VY52/145/

如果你想这样做,就在这里一个按钮单击事件是一个工作示例:

$('#draggableHelper').draggable(); 

$(function(){ 
    $('#image').width(50); 
    $('#image').resizable(); 

    $('#resize-button').on('click',function(){ 
     var size = 150; //Or what ever you want 
     $('#image').resizable('destroy'); 
     $('#image').width(size); 
     $('#image').resizable(); 
    }); 

}); 

http://jsfiddle.net/8VY52/147/

+0

这是唯一的 一个例子。每次用户点击一个按钮时,我都需要触发一次调整大小。 – Cristy

+0

重新调整大小然后重新应用可调整大小。这应该做的伎俩 – Chausser

+0

请张贴与实际工作的小提琴:)。 – Cristy

相关问题