diff --git a/static/js/profile.js b/static/js/profile.js index 374ff07d..e1719e9b 100644 --- a/static/js/profile.js +++ b/static/js/profile.js @@ -1,12 +1,9 @@ $(function() { $(".leave-project").click(function() { - var $this = $(this); - - $("#leave-project-name").text($this.data("name")); - $("#leave-project-code").val($this.data("code")); + $("#leave-project-name").text(this.dataset.name); + $("#leave-project-code").val(this.dataset.code); $('#leave-project-modal').modal("show"); - return false; }); diff --git a/static/js/project.js b/static/js/project.js index 7a765a94..e1d13421 100644 --- a/static/js/project.js +++ b/static/js/project.js @@ -1,10 +1,8 @@ $(function() { $(".member-remove").click(function() { - var $this = $(this); - - $("#rtm-email").text($this.data("email")); - $("#remove-team-member-email").val($this.data("email")); + $("#rtm-email").text(this.dataset.email); + $("#remove-team-member-email").val(this.dataset.email); $('#remove-team-member-modal').modal("show"); return false;