O'Reilly logo

ASP.NET jQuery Cookbook by Sonal Aneel Allana

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Cropping images on a page

jQuery comes with a number of handy plugins to enhance the functionality of web controls. For applications requiring image cropping, a plugin called JCrop can be used with the Image control. In this recipe, we will use this plugin to crop images and display the co-ordinates of the crop area.

Getting ready

  1. Add a new web form Recipe6.aspx to the current project.
  2. Download the JCrop plugin from http://deepliquid.com/content/Jcrop.html.
  3. Save the jquery.Jcrop.js file to the local js folder. Save the stylesheet file jQuery.Jcrop.css to the stylesheet folder css:
    Getting ready
  4. Add both the files we just saw to the page along with the jQuery ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required