That should do it:
var manresize=false;//Variable declared in a global scope
$('#buttonid').click(function(){
manresize=true;
$(".question-case-story").trigger('resize');
});
Now you need to create a custom event called manualresize
for example.
Then you attach that event's listener to your $(".question-case-story")
object
$(".question-case-story").bind('manualresize',function(){
//Same code that would run in the .resizable()
//method with a resize event trigger
});
Copy/use the code from the .resizable()
widget that the resize
event calls (not a 100% percent sure about this but I think that jQuery sadly does not use prototype
) in your custom event
In your $(".question-case-story")
object:
resize: function (event, $this) {
$(this).css({left:'inherit', top:'inherit'});
if(manresize/*var set on manual trigger*/){$(this).trigger("manualresize");manresize=false;}
}