Skip to content

Instantly share code, notes, and snippets.

Henning HenningCash

  • Kiel University of Applied Sciences
  • Kiel, Germany
View GitHub Profile
@HenningCash
HenningCash / alternate_clicks.js
Created Aug 16, 2014
Snap.svg alternate click plugin
View alternate_clicks.js
/**
* Use like .click() but accepts a second callback
*
* example:
* element.alternateClick(function() {}, function() {});
*/
Snap.plugin(function(Snap, Element) {
Element.prototype.alternateClick = function(first, second) {
var i = 0;
this.click(function() {
You can’t perform that action at this time.