draggable and resizable image using jQuery

you can do it without any jQuery plugins.


<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.9.custom.css" rel="stylesheet" />  
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.9.custom.min.js"></script>

<script type="text/javascript">
$(function() {
    $("#image_container")
        .resizable({alsoResize:"#panther"})
        .draggable()
        .css({'width': '500px', 'height': '500px'})
});
</script>


<div id="image_container">
    <img id="panther" src="panther.jpg" width="500px" height="500px" />
</div>


댓글

이 블로그의 인기 게시물

미적분과 차원

자바 로깅

apache rewrite_module 로그