Skip to content

Commit d315298

Browse files
authored
Merge pull request #128 from msisaifu/attributes-and-properties
Attributes and properties
2 parents c601455 + ebc72cf commit d315298

File tree

5 files changed

+120
-120
lines changed

5 files changed

+120
-120
lines changed

2-ui/1-document/06-dom-attributes-and-properties/1-get-user-attribute/solution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<div data-widget-name="menu">Choose the genre</div>
88

99
<script>
10-
// getting it
10+
// অ্যাট্রিবিউট অনুসারে এলিমেন্ট সিলেক্ট
1111
let elem = document.querySelector('[data-widget-name]');
1212
13-
// reading the value
13+
// ভ্যালু menu
1414
alert(elem.dataset.widgetName);
15-
// or
15+
// অথবা
1616
alert(elem.getAttribute('data-widget-name'));
1717
</script>
1818
</body>

2-ui/1-document/06-dom-attributes-and-properties/1-get-user-attribute/task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ importance: 5
44

55
# Get the attribute
66

7-
Write the code to select the element with `data-widget-name` attribute from the document and to read its value.
7+
`data-widget-name` অ্যাট্রিবিউট এর এলিমেন্টটি সিলেক্ট করে অ্যাট্রিবিউটের মান পড়ার কোড লিখুন।
88

99
```html run
1010
<!DOCTYPE html>

2-ui/1-document/06-dom-attributes-and-properties/2-yellow-links/solution.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
First, we need to find all external references.
2+
প্রথমত, আমাদের সকল এক্সটার্নাল লিংক খুঁজে বের করতে হবে।
33

4-
There are two ways.
4+
এটি দুইভাবে করতে পারি।
55

6-
The first is to find all links using `document.querySelectorAll('a')` and then filter out what we need:
6+
প্রথমে আমরা সকল লিংক কে নিব `document.querySelectorAll('a')` এবং তারপর আমরা আমদের চাহিদামত ফিল্টার করব:
77

88
```js
99
let links = document.querySelectorAll('a');
@@ -22,13 +22,13 @@ for (let link of links) {
2222
}
2323
```
2424

25-
Please note: we use `link.getAttribute('href')`. Not `link.href`, because we need the value from HTML.
25+
দয়া করে নোট রাখুন: আমরা `link.getAttribute('href')` ব্যবহার করব। `link.href` ব্যবহার করব না, কেননা আমাদের HTML ভ্যালুটি লাগবে।
2626

27-
...Another, simpler way would be to add the checks to CSS selector:
27+
...আরেকটি উপায় হল, CSS selector ব্যবহার করা:
2828

2929
```js
30-
// look for all links that have :// in href
31-
// but href doesn't start with http://internal.com
30+
// সকল লিংকের href এ :// খুঁজা
31+
// কিন্তু href, http://internal.com দ্বারা শুরু হবে না
3232
let selector = 'a[href*="://"]:not([href^="http://internal.com"])';
3333
let links = document.querySelectorAll(selector);
3434

2-ui/1-document/06-dom-attributes-and-properties/2-yellow-links/task.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ importance: 3
22

33
---
44

5-
# Make external links orange
5+
# এক্সটার্নাল লিংক সমূহকে কমলা রঙয়ের করা
66

7-
Make all external links orange by altering their `style` property.
7+
সকল এক্সটার্নাল লিংক সমূহকে কমলা রঙ করুন তাদের `style` প্রপার্টি পরিবর্তনের মাধ্যমে।
88

9-
A link is external if:
10-
- Its `href` has `://` in it
11-
- But doesn't start with `http://internal.com`.
9+
একটি লিংক এক্সটার্নাল হবে, যদি:
10+
- `href` `://` থাকে।
11+
- তবে এভাবে শুরু হবে না `http://internal.com`
1212

13-
Example:
13+
যেমন:
1414

1515
```html run
1616
<a name="list">the list</a>
@@ -24,12 +24,12 @@ Example:
2424
</ul>
2525

2626
<script>
27-
// setting style for a single link
27+
// একটি লিংকের জন্য স্ট্যাইল সেট
2828
let link = document.querySelector('a');
2929
link.style.color = 'orange';
3030
</script>
3131
```
3232

33-
The result should be:
33+
এটি দেখতে এমন হবে:
3434

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

0 commit comments

Comments
 (0)