Skip to content

Commit 0a708da

Browse files
committed
1-hide-message-delegate
1 parent d6d288b commit 0a708da

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

2-ui/2-events/03-event-delegation/1-hide-message-delegate/solution.view/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010

1111
<div id="container">
1212
<div class="pane">
13-
<h3>Horse</h3>
14-
<p>The horse is one of two extant subspecies of Equus ferus. It is an odd-toed ungulate mammal belonging to the taxonomic family Equidae. The horse has evolved over the past 45 to 55 million years from a small multi-toed creature, Eohippus, into the large, single-toed animal of today.</p>
13+
<h3>Лошадь</h3>
14+
<p>Домашняя лошадь - животное семейства непарнокопытных, одомашненный и единственный сохранившийся подвид дикой лошади, вымершей в дикой природе, за исключением небольшой популяции лошади Пржевальского.</p>
1515
<button class="remove-button">[x]</button>
1616
</div>
1717
<div class="pane">
18-
<h3>Donkey</h3>
19-
<p>The donkey or ass (Equus africanus asinus) is a domesticated member of the horse family, Equidae. The wild ancestor of the donkey is the African wild ass, E. africanus. The donkey has been used as a working animal for at least 5000 years.</p>
18+
<h3>Осёл</h3>
19+
<p>Домашний осёл или ишак — одомашненный подвид дикого осла, сыгравший важную историческую роль в развитии хозяйства и культуры человека. Все одомашненные ослы относятся к африканским ослам.</p>
2020
<button class="remove-button">[x]</button>
2121
</div>
2222
<div class="pane">
23-
<h3>Cat</h3>
24-
<p>The domestic cat (Latin: Felis catus) is a small, typically furry, carnivorous mammal. They are often called house cats when kept as indoor pets or simply cats when there is no need to distinguish them from other felids and felines. Cats are often valued by humans for companionship and for their ability to hunt vermin.
23+
<h3>Кошка</h3>
24+
<p>Кошка, или домашняя кошка (лат. Félis silvéstris cátus), — домашнее животное, одно из наиболее популярных (наряду с собакой) «животных-компаньонов». С точки зрения научной систематики, домашняя кошка — млекопитающее семейства кошачьих отряда хищных. Ранее домашнюю кошку нередко рассматривали как отдельный биологический вид.
2525
</p>
2626
<button class="remove-button">[x]</button>
2727
</div>

2-ui/2-events/03-event-delegation/1-hide-message-delegate/source.view/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010

1111
<div id="container">
1212
<div class="pane">
13-
<h3>Horse</h3>
14-
<p>The horse is one of two extant subspecies of Equus ferus. It is an odd-toed ungulate mammal belonging to the taxonomic family Equidae. The horse has evolved over the past 45 to 55 million years from a small multi-toed creature, Eohippus, into the large, single-toed animal of today.</p>
13+
<h3>Лошадь</h3>
14+
<p>Домашняя лошадь - животное семейства непарнокопытных, одомашненный и единственный сохранившийся подвид дикой лошади, вымершей в дикой природе, за исключением небольшой популяции лошади Пржевальского.</p>
1515
<button class="remove-button">[x]</button>
1616
</div>
1717
<div class="pane">
18-
<h3>Donkey</h3>
19-
<p>The donkey or ass (Equus africanus asinus) is a domesticated member of the horse family, Equidae. The wild ancestor of the donkey is the African wild ass, E. africanus. The donkey has been used as a working animal for at least 5000 years.</p>
18+
<h3>Осёл</h3>
19+
<p>Домашний осёл или ишак — одомашненный подвид дикого осла, сыгравший важную историческую роль в развитии хозяйства и культуры человека. Все одомашненные ослы относятся к африканским ослам.</p>
2020
<button class="remove-button">[x]</button>
2121
</div>
2222
<div class="pane">
23-
<h3>Cat</h3>
24-
<p>The domestic cat (Latin: Felis catus) is a small, typically furry, carnivorous mammal. They are often called house cats when kept as indoor pets or simply cats when there is no need to distinguish them from other felids and felines. Cats are often valued by humans for companionship and for their ability to hunt vermin.
23+
<h3>Кошка</h3>
24+
<p>Кошка, или домашняя кошка (лат. Félis silvéstris cátus), — домашнее животное, одно из наиболее популярных (наряду с собакой) «животных-компаньонов». С точки зрения научной систематики, домашняя кошка — млекопитающее семейства кошачьих отряда хищных. Ранее домашнюю кошку нередко рассматривали как отдельный биологический вид.
2525
</p>
2626
<button class="remove-button">[x]</button>
2727
</div>

2-ui/2-events/03-event-delegation/1-hide-message-delegate/task.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ importance: 5
22

33
---
44

5-
# Hide messages with delegation
5+
# Скрытие сообщения с помощью делегирования
66

7-
There's a list of messages with removal buttons `[x]`. Make the buttons work.
7+
Дан список сообщений с кнопкой для удаления `[x]`. Заставьте кнопку работать.
88

9-
Like this:
9+
В результате, должно работать вот так:
1010

1111
[iframe src="solution" height=420]
1212

13-
P.S. Should be only one event listener on the container, use event delegation.
13+
P.S. Используйте делегирование событий. Один обработчик для всего.

0 commit comments

Comments
 (0)