forked from boblemarin/jQuery.eraser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added callback ability when a certain ratio is reacher.
- Loading branch information
1 parent
bb30266
commit 101c98b
Showing
10 changed files
with
192 additions
and
25 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,119 @@ | |||
<!DOCTYPE html> | |||
<html lang="en"> | |||
<head> | |||
<meta charset="utf-8" /> | |||
<meta name='HandheldFriendly' content='True' /> | |||
<!--<meta name='viewport' content='initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' />--> | |||
<meta name='viewport' content='user-scalable=0' /> | |||
<meta name="viewport" content="width=device-width" /> | |||
<title>PLEASE BRUSH MY TEETH ! jQuery.eraser demo</title> | |||
|
|||
<style type="text/css"> | |||
|
|||
body { | |||
background: #FFF; | |||
color: #FFF; | |||
margin: 5px; | |||
padding: 0px; | |||
margin-bottom: 45px; | |||
text-align: center; | |||
font-family: Helvetica, Arial; | |||
} | |||
|
|||
a { | |||
color: #000; | |||
} | |||
|
|||
a.box { | |||
text-decoration: none; | |||
display: inline-block; | |||
color: #000; | |||
background: #DDD; | |||
padding: 10px; | |||
margin: 10px; | |||
} | |||
|
|||
.big { | |||
font-size: 2em; | |||
display: inline-block; | |||
margin: 10px; | |||
} | |||
.container { | |||
position: relative; | |||
display: inline-block; | |||
width: 675px; | |||
height: 850px; | |||
} | |||
|
|||
#robot { | |||
position: absolute; | |||
top: 0px; | |||
left: 0px; | |||
z-index: 1; | |||
} | |||
|
|||
#redux { | |||
position: absolute; | |||
top: 444px; | |||
left: 208px; | |||
z-index: 2; | |||
} | |||
|
|||
</style> | |||
</head> | |||
<body> | |||
<span class="container"> | |||
<img id="robot" src="img/please.jpg" /> | |||
<img id="redux" src="img/overlay.jpg" /> | |||
</span> | |||
<p> | |||
<a href="#" onclick="reset(event);" class="box"> RESET </a> | |||
<a href="#" onclick="remove(event);" class="box"> CLEAR </a> | |||
</p> | |||
|
|||
<script src='js/jquery-1.6.2.min.js' type='text/javascript'></script> | |||
<script src='js/jquery.eraser.js' type='text/javascript'></script> | |||
<script type = "text/javascript"> | |||
|
|||
addEventListener( "load", init, false ); | |||
|
|||
function init( event ) { | |||
$("#redux").eraser( { size: 10 } ); | |||
|
|||
// you can alse specify the brush size (in pixel) by using options : | |||
// $("#redux").eraser({size: 20}); | |||
} | |||
|
|||
function remove(event) { | |||
$("#redux").eraser('clear'); | |||
event.preventDefault(); | |||
} | |||
|
|||
function reset(event) { | |||
$("#redux").eraser('reset'); | |||
event.preventDefault(); | |||
} | |||
|
|||
</script> | |||
|
|||
<p><a href="index.htm">Made with jQuery.eraser()</a></p> | |||
|
|||
<p> | |||
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> | |||
<g:plusone></g:plusone> | |||
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="boblemarin">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> | |||
<iframe src="http://www.facebook.com/plugins/like.php?app_id=221981371170477&href=http%3A%2F%2Fminimal.be%2Flab%2FjQuery.eraser%2Fteeth.htm&send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:160px; height:21px;" allowTransparency="true"></iframe> | |||
</p> | |||
<script type="text/javascript"> | |||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | |||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |||
</script> | |||
<script type="text/javascript"> | |||
try { | |||
var pageTracker = _gat._getTracker("UA-9528692-4"); | |||
pageTracker._trackPageview(); | |||
} catch(err) {}</script> | |||
|
|||
</body> | |||
|
|||
</html> |