Created
July 1, 2013 15:18
-
-
Save scottsappen/5901750 to your computer and use it in GitHub Desktop.
Talk about an easy image cropper. http://deepliquid.com/content/Jcrop.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="../Scripts/jquery.Jcrop.min.js" type="text/javascript"></script> | |
<style type="text/css" media="all">@import "../Styles/jquery.Jcrop.css";</style> | |
<img id="mycroppable" src="#yoururl" title=""/> | |
<script language="javascript" type="text/javascript"> | |
$(document).ready(function () { | |
function setImageCropCoords(c) { | |
// variables can be accessed here as | |
//c.x, c.y, c.x2, c.y2, c.w, c.h | |
}; | |
//cropper | |
$("#mycroppable").Jcrop({ | |
onSelect: setImageCropCoords, | |
setSelect: [0, 0, 200, 200], | |
minSize: [200, 200], | |
maxSize: [200, 200] | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment