Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Mouse events#164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bilgedemirkaya merged 3 commits intojavascript-tutorial:masterfrombilgedemirkaya:bilgedemirkaya-event-basics
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,16 +2,17 @@ importance: 5

---

#Selectable list
#Seçilebilir liste

Create a list where elements are selectable, like in file-managers.
Dosya yöneticilerinde olduğu gibi öğelerin seçilebilir olduğu bir liste oluşturun.

- A click on a list element selects only that element (adds the class `.selected`),deselects all others.
- If a click is made with`key:Ctrl`(`key:Cmd` for Mac),then the selection is toggled on the element, but other elements are not modified.
- Bir liste elemanına tıklandığında sadece o eleman seçilir (".selected" sınıfını ekler),diğerlerinin seçimini kaldırır.
- Eğer tıklama`key:Ctrl`ile yapıldıysa (Mac için`key:Cmd`),tıklama yapılan eleman seçilir, ancak diğer elemanlar etkilenmez.

The demo:
Demo:

[iframe border="1" src="solution" height=180]

P.S. For this task we can assume that list items are text-only. No nested tags.
P.P.S. Prevent the native browser selection of the text on clicks.
**NOT** Bu görev için, liste öğelerinin yalnızca metin olduğunu varsayabiliriz. İç içe geçmiş tag yok.

**NOT** Tıklamalarda metnin yerel tarayıcı seçimini engelleyin.
Loading

[8]ページ先頭

©2009-2025 Movatter.jp