jquery-cropper
A jQuery plugin wrapper for Cropper.js.
Main
dist/├── jquery-cropper.js (UMD)├── jquery-cropper.min.js (UMD, compressed)├── jquery-cropper.common.js (CommonJS, default)└── jquery-cropper.esm.js (ES Module)
Getting started
Installation
npm install jquery-cropper jquery cropperjs
Include files:
<!-- jQuery is required --><!-- Cropper.js is required -->
Usage
Initialize with $.fn.cropper
method.
<!-- Wrap the image or canvas element with a block element (container) -->
/* Limit image width to avoid overflow the container */
var $image = ; $image; // Get the Cropper.js instance after initializedvar cropper = $imagedata'cropper';
Options
See the available options of Cropper.js.
;
Methods
See the available methods of Cropper.js.
;
Events
See the available events of Cropper.js.
;
No conflict
If you have to use other plugin with the same namespace, just call the $.fn.cropper.noConflict
method to revert to it.
Browser support
It is the same as the browser support of Cropper.js. As a jQuery plugin, you also need to see the jQuery Browser Support.
Contributing
Please read through our contributing guidelines.
Versioning
Maintained under the Semantic Versioning guidelines.