简体   繁体   中英

How to resize every time for the same pixel value e.g.(“10px”) with jquery-ui?

I wonder if there is any way to resize a div element for the same pixel value every time when i wanna resize the div element eg("10px"). I'm trying to do it with jquery-ui, i can resize but i wanna resize it every time for some pixel value, and with the same value reduce it.

$(children[0]).resizable({
    handles: "e, w"                               
});

I'm doing it with resizable . Anyone know if there is a way to do it?

Thanks.

I don't know if I got the question right, but I think you just need to use the grid param as such:

$( "#resizable" ).resizable({
  grid: 10
});

You can find the documentation here

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