jquery resizable is not working in my code, its only working when then image is directly loaded. Not working when image is added to a div
Here is my code:-
<html lang="en">
<head>
<title>Outfit Demo</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>
<script type="text/javascript">
jQuery(document).ready(function(event){
jQuery(".pic1").draggable();
jQuery(".pic1").resizable();
});
function select(src)
{
path = "<img class=\"pic1\" src=\""+src+"\" height=\"300px\" width=\"300px\"/>";
document.getElementById("image").innerHTML=path;
}
</script>
</head>
<body>
<div id="leftpanel" style="position:absolute;left:0;width:50%;">
<div style="left:0;height:30%;" id="image"></div>
</div>
<div id="middlepanel" style="width: 100%; height: 100%; position:absolute;left:500;width:50%;">
<img class="pic1" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcT-cYNnwQZF6R0T5v11nnXOmdWWEGj4Tf7tKMhbB_FsNFo8yLmaeg" height="300px" width="700px" onclick="select(this.src)"/>
</div> S
</body>
</html>
Help me out in this please