From b2d7a58a0fb7029bd6ccfe5d1fa1fed284a1908b Mon Sep 17 00:00:00 2001 From: Hanna parsa Date: Mon, 21 Aug 2023 09:14:07 +0330 Subject: [PATCH 01/20] Update article.md --- 2-ui/99-ui-misc/01-mutation-observer/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2-ui/99-ui-misc/01-mutation-observer/article.md b/2-ui/99-ui-misc/01-mutation-observer/article.md index 9ddaad16a..c56685cbe 100644 --- a/2-ui/99-ui-misc/01-mutation-observer/article.md +++ b/2-ui/99-ui-misc/01-mutation-observer/article.md @@ -7,9 +7,9 @@ ## Syntax -`MutationObserver` is easy to use. +استفاده از `MutationObserver` بسیار ساده است. -First, we create an observer with a callback-function: +اول از ههمه، یک observer با استفاده از callback-function می سازیم: ```js let observer = new MutationObserver(callback); From 7381d3703eca16dc8ed28e172135d30fb533d089 Mon Sep 17 00:00:00 2001 From: Hanna parsa Date: Mon, 21 Aug 2023 10:50:41 +0330 Subject: [PATCH 02/20] Update article.md --- 2-ui/99-ui-misc/01-mutation-observer/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-ui/99-ui-misc/01-mutation-observer/article.md b/2-ui/99-ui-misc/01-mutation-observer/article.md index c56685cbe..ea15a9dc0 100644 --- a/2-ui/99-ui-misc/01-mutation-observer/article.md +++ b/2-ui/99-ui-misc/01-mutation-observer/article.md @@ -15,7 +15,7 @@ let observer = new MutationObserver(callback); ``` -And then attach it to a DOM node: +و بعد observer را به DOM node، attach می کند. ```js observer.observe(node, config); From 909c9ddb06f18f64692a2a76009066e905a29ccd Mon Sep 17 00:00:00 2001 From: Hanna parsa Date: Mon, 21 Aug 2023 13:18:15 +0330 Subject: [PATCH 03/20] Update article.md --- .../3-events-change-input/article.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/2-ui/4-forms-controls/3-events-change-input/article.md b/2-ui/4-forms-controls/3-events-change-input/article.md index 19f20e2fe..869a2d260 100644 --- a/2-ui/4-forms-controls/3-events-change-input/article.md +++ b/2-ui/4-forms-controls/3-events-change-input/article.md @@ -1,23 +1,21 @@ # Events: change, input, cut, copy, paste -بیایید event های مختلفی را که همراه با به روز رسانی داده ها هستند، پوشش دهیم. -## Event: change - -در event `change` وقتی که element تغیرات را متوقف می کند، trigger شدن رخ می دهد. - +Let's cover various events that accompany data updates. -در ورودی های متن به این معنی است که event زمانی رخ می دهد که فوکوس خود را از دست بدهد. +## Event: change -به عنوان مثال، وقتی که در فایل زیر تایپ می کنیم--هیچ event وجود ندارد. اما وقتی تمرکزمان را روی قسمت دیگری ببریم، مثلا، کلیک کردن روی دکمه--آن وقت یک `change` event خواهیم داشت. +The `change` event triggers when the element has finished changing. +For text inputs that means that the event occurs when it loses focus. +For instance, while we are typing in the text field below -- there's no event. But when we move the focus somewhere else, for instance, click on a button -- there will be a `change` event: ```html autorun height=40 run ``` -برای باقی element ها: `select`, `input type=checkbox/radio` دقیقا وقتی که selection تغییر می کند trigger می شود: +For other elements: `select`, `input type=checkbox/radio` it triggers right after the selection changes: ```html autorun height=40 run ``` - برای دیگر elementها: `select` و `input type=checkbox/radio` دقیقا بعد از آن که انتخاب تغییر می‌کند فعال می‌شود: - ```html autorun height=40 run