in Jcrop , after selecting cropping area , a div appears with box handles in corners.
Is there any jQuery plugin that can build this type of box handles ?
in Jcrop , after selecting cropping area , a div appears with box handles in corners.
Is there any jQuery plugin that can build this type of box handles ?
You can use jQuery UI's resizable as noted above. I even setup a fiddle for ya!
http://jsfiddle.net/digitalaxis/j2JU6/
jQUERY
$('#element').resizable({
handles: {
'ne': '#negrip',
'se': '#segrip',
'sw': '#swgrip',
'nw': '#nwgrip'
}
});
HTML
<div class="ui-resizable-handle ui-resizable-nw" id="nwgrip"></div>
<div class="ui-resizable-handle ui-resizable-ne" id="negrip"></div>
<div class="ui-resizable-handle ui-resizable-sw" id="swgrip"></div>
<div class="ui-resizable-handle ui-resizable-se" id="segrip"></div>
CSS
#elementResizable {
border: 1px solid #000000;
width: 300px;
height: 40px;
overflow: hidden;
}
#nwgrip, #negrip, #swgrip, #segrip, #ngrip, #egrip, #sgrip, #wgrip {
width: 10px;
height: 10px;
background-color: #ffffff;
border: 1px solid #000000;
}
#segrip {
right: -5px;
bottom: -5px;
}
You can use the jQuery UI Resizable plugin:
http://jqueryui.com/demos/resizable/
Use the "handles" parameter to make your element resizable through it's entire border.
© 2022 - 2024 — McMap. All rights reserved.