From 0f658a6fb8ef9d8dda7acc74bffdd9458eddc4cd Mon Sep 17 00:00:00 2001 From: onozaty Date: Thu, 4 May 2023 23:47:34 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=81=E3=82=B1=E3=83=83=E3=83=88=E3=81=AE?= =?UTF-8?q?=E4=BD=9C=E6=88=90=E3=81=A8=E7=B7=A8=E9=9B=86=E3=82=92=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E3=81=99=E3=82=8BTips=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tips/tips.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tips/tips.md b/tips/tips.md index d1beb01..8cbca93 100644 --- a/tips/tips.md +++ b/tips/tips.md @@ -12,6 +12,20 @@ $('#issue-form').on('submit', function() { }); ``` +## Judge the creation and editing of an issue + +```javascript +if ($('form.new_issue').length === 1) { + // new issue + console.log('new'); +} + +if ($('form.edit_issue').length === 1) { + // edit issue + console.log('edit'); +} +``` + ## Check the roles ```javascript