Add Russian translation (#19085)
* Add Russian translation * Change line 6 * 26-30
This commit is contained in:
@ -3,25 +3,31 @@ id: bad87fee1348bd9aed208826
|
|||||||
title: Target the Children of an Element Using jQuery
|
title: Target the Children of an Element Using jQuery
|
||||||
challengeType: 6
|
challengeType: 6
|
||||||
videoUrl: ''
|
videoUrl: ''
|
||||||
localeTitle: Цель детей элемента с помощью jQuery
|
localeTitle: Выбрать дочерние элементы с помощью jQuery
|
||||||
---
|
---
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
undefined
|
Когда HTML элементы размещены на один уровень ниже другого, они называются `дочерними` этого элемента. Например, элементы кнопки в этом задании с текстом "#target1", "#target2", и "#target3" являются `дочерними` элемента `<div class="well" id="left-well">`.
|
||||||
|
|
||||||
|
В jQuery есть функция `children()`, которая позволяет вам получить доступ к дочерним элементам любого выбранного вами элемента.
|
||||||
|
|
||||||
|
Ниже пример того, как бы вы использовали функцию `children()`, чтобы дать `синий` цвет дочерним элементам вашего `left-well`.
|
||||||
|
|
||||||
|
`$("#left-well").children().css("color", "blue")`
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
<section id="instructions"> Дайте всем детям вашего <code>right-well</code> элемента колорит оранжевый цвет. </section>
|
<section id="instructions"> Дайте всем дочерним элементам вашего <code>right-well</code> элемента колорит оранжевый цвет. </section>
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
<section id='tests'>
|
<section id='tests'>
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
tests:
|
tests:
|
||||||
- text: ''
|
- text: 'Все дочерние элементы <code>#right-well</code> должны иметь оранжевый текст'
|
||||||
testString: 'assert($("#right-well").children().css("color") === "rgb(255, 165, 0)", "All children of <code>#right-well</code> should have orange text.");'
|
testString: 'assert($("#right-well").children().css("color") === "rgb(255, 165, 0)", "All children of <code>#right-well</code> should have orange text.");'
|
||||||
- text: Вы должны использовать функцию <code>children()</code> для изменения этих элементов.
|
- text: Вы должны использовать функцию <code>children()</code> для изменения этих элементов.
|
||||||
testString: 'assert(code.match(/\.children\(\)\.css/g), "You should use the <code>children()</code> function to modify these elements.");'
|
testString: 'assert(code.match(/\.children\(\)\.css/g), "You should use the <code>children()</code> function to modify these elements.");'
|
||||||
- text: ''
|
- text: 'Используйте только jQuery, чтобы добавить эти классы к элементу.'
|
||||||
testString: 'assert(code.match(/<div class="well" id="right-well">/g), "Only use jQuery to add these classes to the element.");'
|
testString: 'assert(code.match(/<div class="well" id="right-well">/g), "Only use jQuery to add these classes to the element.");'
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user