The example of this article describes the Jcrop usage of the jquery avatar cropping tool. Share to everyone for your reference, specific as follows:
Avatar Cutting Tool is currently more popular in Flash and jquery. Personally think that using jquery is better, because the code carefully studied, basically can understand what is going on, want to change the words are relatively easy.
There is an example, please refer to: jcrop example demo, is the root jcrop example to change, add the following two features:
1, center display, and can be towed, change the size of the interception
2, preview the picture, the root drag size proportional.
The following is the JS code, made a simple encapsulation
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > < HTML xmlns= "http://www.w3.org/1999/xhtml" >
jquery Jcrop combined with jquery Ajax upload, can make Avatar upload interception function, very human.
Full instance code click here to download the site.
More about jquery plug-ins interested readers can view the site topics: "jquery common Plug-ins and Usage summary"
I hope this article will help you with the jquery program design.