Skip to content

translate DOM properties and attributes into arabic #20

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
importance: 5
درجة الأهمية: 5

---

# Get the attribute
# الخصول على الخاصية

Write the code to select the element with `data-widget-name` attribute from the document and to read its value.
اكتب الرمز لتحديد العنصر الذي يحتوي على السمة `data-widget-name` من المستند وقراءة قيمته.

```html run
<!DOCTYPE html>
Expand All @@ -19,3 +19,4 @@ Write the code to select the element with `data-widget-name` attribute from the
</body>
</html>
```

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
أولاً ، نحن بحاجة إلى العثور على جميع المراجع الخارجية.

First, we need to find all external references.
هناك طريقتان.

There are two ways.

The first is to find all links using `document.querySelectorAll('a')` and then filter out what we need:
الأول هو العثور على جميع الروابط باستخدام `document.querySelectorAll ('a')` ثم تصفية ما نحتاج إليه:

```js
let links = document.querySelectorAll('a');
Expand All @@ -22,9 +21,9 @@ for (let link of links) {
}
```

Please note: we use `link.getAttribute('href')`. Not `link.href`, because we need the value from HTML.
يرجى ملاحظة ما يلي: نستخدم `link.getAttribute ('href')`. ليس `link.href` ، لأننا نحتاج إلى القيمة من HTML.

...Another, simpler way would be to add the checks to CSS selector:
... طريقة أخرى أبسط هي إضافة الشيكات إلى محدد CSS:

```js
// look for all links that have :// in href
Expand All @@ -34,3 +33,4 @@ let links = document.querySelectorAll(selector);

links.forEach(link => link.style.color = 'orange');
```

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
importance: 3
درجة الأهمية: 3

---

# Make external links orange
# اجعل الروابط الخارجية برتقالية

Make all external links orange by altering their `style` property.
اجعل جميع الروابط الخارجية برتقالية من خلال تعديل خاصية `النمط 'الخاصة بها.

A link is external if:
الرابط يعتبر خارجيا إذا:
- Its `href` has `://` in it
- But doesn't start with `http://internal.com`.

Expand All @@ -30,6 +30,7 @@ Example:
</script>
```

The result should be:
النتيجة يجيب أن تكون:

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

Loading