Download jquery extension wscratchpad.js, the original site page cannot open, I provide a download address here Wscratchpad-2.1.0.zip
Then (cool), some not moral integrity bloggers, directly to other people's article, the verification process has been saved, should pit is not small white. I'll fix it here.
In this extension, how can we get past the area of the user's scraping open
Copy the Code code as follows:
$ ("#wScratchPad3"). Wscratchpad ({
Cursor: ',//set the mouse style
Color: ' Gray ',//Set the color of the overlay, repel with the Image2 function
Width: "300",
Height: "100",
Image: ""//Picture at top
For more configuration-related options, see source code
Scratchup:function (e, percent) {
If (Percent > 60)
{
Alert ("SSS");
}
}
});
From the code above, see that this is not the same as the web-so-called tutorial, here to get the scope of scraping to use the function is not
Scratchmove ()
But
Scratchup ()
For what? See source
Copy the Code code as follows:
Scratchfunc:function (E, $this, event)
{
E.pagex = Math.floor (e.pagex-$this. Canvas_offset.left);
E.pagey = Math.floor (e.pagey-$this. canvas_offset.top);
$this [' Scratch ' + event] (e, $this);
if (this.settings.realtimePercent | | event = = "Up") {
if ($this. settings[' Scratch ' + event]) $this. settings[' Scratch ' + event].apply ($this, [E, $this. Scratchpercentage ($ This)]);
}
}
Here this gets the function bound up instead of the move
http://www.bkjia.com/PHPjc/781412.html www.bkjia.com true http://www.bkjia.com/PHPjc/781412.html techarticle download jquery extension wscratchpad.js, the original site page cannot open, I here provide a download address wscratchpad-2.1.0.zip and then (cool), some not moral integrity bloggers, directly to others ...