Submit your widget

Images Scratch Card Plugin---jQuery Scratchie

Created 8 years ago   Views 23842   downloads 3812    Author alexweber
Images Scratch Card Plugin---jQuery Scratchie
View DemoDownload 49.7 KB
124
Share |

Don't support IE

This is a fully-customizable scratchcard plugin

Define a background image and an overlay image or color and clicking and click or just drag the mouse over the overlay to reveal the target image underneath!

 

// executes the plugin on the selected div
// the plugin accepts a multitude of parameters but can be executed with
// a minimal configuration
$(document).ready(function(){
 $('#raspadinha').scratchie({
     target : 'target',
        img : 'prize.jpg',
        imgHeight : 200, // target (prize) img height
        imgWidth : 400, // target (prize) img width
        title : 'Try your luck!',
        fillImg : 'overlay.jpg',
        requireMouseClick : false,
        callback: function(){
         alert('Congratulations!');
        }
 });
});

The article source:http://code.alexweber.com.br/jquery/scratchie/