Last active
December 25, 2015 12:59
-
-
Save vagnerzampieri/6979979 to your computer and use it in GitHub Desktop.
Disable Ctrl+c and Ctrl+v with JQuery
This file contains hidden or 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
| $(document).ready(function(){ | |
| function bindingElements(element, index, array) { | |
| $(element).bind("copy paste", function(e){ | |
| e.preventDefault(); | |
| }); | |
| }; | |
| ['#user_confirm_email', '#user_password_confirmation'].forEach(bindingElements); | |
| }); |
This file contains hidden or 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
| $(document).ready(function(){ | |
| $('#user_confirm_email').bind("copy paste", function(e){ | |
| e.preventDefault(); | |
| }); | |
| }); |
This file contains hidden or 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
| = simple_form_for @user do |f| | |
| = f.input :email | |
| = f.input :confirm_email |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment