manually start resize
manually start resize
Hi all,
I'm trying to do a kind of drag-select thingy using resizeable. So I
have it all setup to create the resizeable on mousedown, but then I
want to start the resize process in that same event so that the user
can create the resizeable and give it an initial size with one click-
and-drag.
I've tried calling the start and resizestart methods on the object,
but they don't seem to exist in the DOM object's instance namespace.
Any ideas?
Thanks,
Ian
Here's something along the lines of what I'm doing:
$(document).ready(function(){
$('.parent').mousedown(function(event){
var myResizable = $(document.createElement('div'));
var handle = $(document.createElement('div'))
handle.addClass('handle-s');
myResizable.append(handle);
$(event.target).after(myResizable);
myResizable.resizable({
handles: {
s: '.handle-s'
},
});
myResizable.start(); // error
});
})