Permalink
Browse files

Add sample javascript for onclick handling

  • Loading branch information...
1 parent 6bd05ba commit fea0df93236362900165295187162fc83ef23d50 @paulosman paulosman committed Jul 22, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 static/browserid.js
View
@@ -0,0 +1,10 @@
+$('#browserid').bind('click', function(e) {
+ e.preventDefault();
+ navigator.getVerifiedEmail(function(assertion) {
+ if (assertion) {
+ var $e = $('#id_assertion');
+ $e.val(assertion.toString());
+ $e.parent().submit();
+ }
+ });
+});

0 comments on commit fea0df9

Please sign in to comment.