Created
February 27, 2019 18:47
-
-
Save TonyArra/9c9ee9d077b9612c70f2537e21213719 to your computer and use it in GitHub Desktop.
This file contains 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
$('input[name=bar1]').bind("paste", function(e){ | |
var pastedData = e.originalEvent.clipboardData.getData('text'); | |
var sections = pastedData.split("-"); | |
for (var i = 0; i < sections.length; i++) { | |
$('input[name=bar' + (i + 1) + ']').val(sections[i]); | |
} | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment