jQuery Scratchie 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!
Download Link
// 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!');
}
});
});
jQuery Scratchie é um plugin completo para criar "raspadinhas"
Defina uma imagem de fundo (o prêmio) e uma imagem ou cor para cobrir e clique ou arrasteo mouse por cima para revelar a imagem debaixo!
Download Link
// executa o plugin no div selecionado
// a função aceita vários parâmetros mas pode
// ser executada com uma configuração mínima
$(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!');
}
});
});

