Skip to content
This repository has been archived by the owner on Jan 31, 2018. It is now read-only.

Commit

Permalink
close widget with escape-key
Browse files Browse the repository at this point in the history
  • Loading branch information
Isac Lagerblad authored and Isac Lagerblad committed Jun 1, 2012
1 parent 70ceae0 commit 8695b64
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/socialshare.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,10 @@
$(this).trigger("click");
}
});
$(document).keydown(function(e) {
if (e.which === 27 && $(".socialshare").hasClass("open")) {
$(".share-button").trigger("click");
}
});
});
})(window.jQuery);

0 comments on commit 8695b64

Please sign in to comment.