Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to re-size and drag an image selected from a folder
    primarykey
    data
    text
    <p>I want to re-size and drag an image which is selected by user from a folder. i could do it seperately. But when i combined select image from a folder and then resize and drag it, i didn't work. the selected image is displayed, but it is immovable. i don't know how to do it. Can anyone tell me?</p> <p>This is the final code: </p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;link class="jsbin" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" /&gt; &lt;script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; &lt;script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js"&gt;&lt;/script&gt; &lt;meta charset=utf-8 /&gt; &lt;title&gt;JS Bin&lt;/title&gt; &lt;!--[if IE]&gt; &lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt; &lt;![endif]--&gt; &lt;style&gt; article, aside, figure, footer, header, hgroup, menu, nav, section { display: block; } &lt;/style&gt; &lt;body&gt; &lt;input type='file' onchange="readURL(this);" /&gt; &lt;img id="blah" src="#" alt="your image" /&gt; &lt;/body&gt; &lt;style type="text/css"&gt; #blah { width: 260px; height:300px; padding: 0; } #blah img { width: 100%; height: 100%; } &lt;/style&gt; &lt;script type="text/javascript"&gt; $(function() { $("#blah").resizable(); $("#blah").draggable(); }); &lt;/script&gt; &lt;script&gt; function readURL(input) { if (input.files &amp;&amp; input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#blah') .attr('src', e.target.result) .width(150) .height(200); }; reader.readAsDataURL(input.files[0]); } } &lt;/script&gt; &lt;/head&gt; &lt;/html&gt; </code></pre> <p>Below is the screenshot of result. Even image is displayed, no option to resize( the edge is not resizble bottom right edge) <img src="https://i.stack.imgur.com/qRaSd.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload