Advertisement
jamboljack

JS Edit Button

Jul 27th, 2017
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. <script type="text/javascript">
  2. $(function() {
  3.     $(document).on("click",'.edit_button', function(e) {
  4.         var id          = $(this).data('id');
  5.         var name        = $(this).data('name');
  6.         $(".id").val(id);
  7.         $(".name").val(name);
  8.     })
  9. });
  10. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement