This time I will share jQuery Plugin and tutorial about Canvas Based Image Masking Plugin with jQuery – ImgMask, hope it will help you in programming stack.
ImgMask is a jQuery image masking / overlapping plugin that replaces part of an image with a transparent image / pattern based on Html5 canvas
technique.
Basic usage:
1. Load the latest version of jQuery library and the jQuery ImgMask plugin in the html document.
1 |
< script src = "//code.jquery.com/jquery-2.1.4.min.js" ></ script > |
2 |
< script src = "jquery.imgMask.min.js" ></ script > |
2. Create an empty container element with an unique ID.
1 |
< div id = "example" ></ div > |
3. Call the function on the container element and specify the path to your image and mask files.
1 |
$( '#example' ).imgMask({ |
4. Plugin’s default settings.
01 |
$( '#example' ).imgMask({ |
This awesome jQuery plugin is developed by desta88. For more Advanced Usages, please check the demo page or visit the official website.