Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="box--display--img"><img id="i" /></div>
- <input id="f" type="file" />
- $(function() {
- $("#f").on("change", function(ev) {
- var f = ev.target.files[0];
- var fr = new FileReader();
- fr.onload = function(ev2) {
- console.dir(ev2);
- $("#i").attr("src", ev2.target.result);
- };
- fr.readAsDataURL(f);
- });
- });
- $(function() {
- $("#i").draggable({
- containment: "parent"
- });
- });
- $(function() {
- $("#i").resizable();
- });
Add Comment
Please, Sign In to add comment