Advertisement
chrishajer

jQuery to concatenate two fields on front end

May 30th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.36 KB | None | 0 0
  1. /* for Help Scout #24709 */
  2. <script type="text/javascript">
  3.     var $jq = jQuery.noConflict();
  4.     /* which fields do we want to watch for input changes? i.e. first and last name */
  5.     $jq('#input_390_1_3, #input_390_1_6').bind('keypress blur', function() {
  6.         $jq('#input_390_2').val($jq('#input_390_1_3').val() + ' ' + $jq('#input_390_1_6').val() );
  7.     });
  8. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement