简体   繁体   中英

How to manually start resizing via jquery-ui resizable?

I'm trying to do something like this:

$('#wrapper').mousemove(function(){
    $newContainer.trigger('resize');
})

It doesn't work and should not work. There is any way to start resizing, not clicking on .ui-resizable-handle element?

Actually you can resize an element on mousemove. But for that you can make a css class and after firing of that event you can simply add the class to that element. Or you can use margin, padding, height, width to resize.

    $('#wrapper').mousemove(function(){
        $newContainer.addClass('css_class_name');
    });

    or 

    $('#wrapper').mousemove(function(){
        $newContainer.height('200');//according to your need
        $newContainer.width('200');
    });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM