jQuery UI Resize Animation

Try to drag squre border to resize.
ExampleJquery ui resize animation
Source Code Expand
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<script type="text/javascript" src="http://www.pureexample.com/js/lib/jquery.ui.touch-punch.min.js"></script>


<!-- CSS -->
<style type="text/css">
.square {
    width: 100px;
    height: 100px;
    border: 1px solid black;
    margin-bottom: 5px;
    margin-left: 5px;
    text-align: center;
    float: left;
    background-color: lightblue;
    cursor: pointer;
}

.helper {
    border: 2px solid gray;
}
</style>


<!-- Javascript -->
<script>
$(function () {
	$(".square").resizable({
		animate: true,
		helper: "helper"
	});
});
</script>

<!-- HTML -->
<div style="float:left">
    <div class="square">jquery is a easy to use javascript library</div>          	
</div>


comments powered by Disqus