Guest User

Untitled

a guest
Dec 10th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. <div class="box--display--img"><img id="i" /></div>
  2. <input id="f" type="file" />
  3.  
  4. $(function() {
  5. $("#f").on("change", function(ev) {
  6. var f = ev.target.files[0];
  7. var fr = new FileReader();
  8.  
  9. fr.onload = function(ev2) {
  10. console.dir(ev2);
  11. $("#i").attr("src", ev2.target.result);
  12. };
  13.  
  14. fr.readAsDataURL(f);
  15. });
  16. });
  17.  
  18. $(function() {
  19. $("#i").draggable({
  20. containment: "parent"
  21. });
  22. });
  23.  
  24. $(function() {
  25. $("#i").resizable();
  26. });
Add Comment
Please, Sign In to add comment