--- id: bad87fee1348bd9aec908855 title: Give Each Element a Unique id challengeType: 0 forumTopicId: 18191 localeTitle: 给每个元素一个唯一的 id --- ## Description
我们也可以通过 jQuery 根据每个按钮唯一的 id 来标识出它们。 给你的每一个按钮设置唯一的 id,以 target1 开始,target6 结束。 确保 target1target3#left-well 之中,target4target6#right-well 之中。
## Instructions
## Tests
```yml tests: - text: 其中一个 button 元素应该有 id target1。 testString: assert($("#left-well").children("#target1") && $("#left-well").children("#target1").length > 0); - text: 其中一个 button 元素应该有 id target2。 testString: assert($("#left-well").children("#target2") && $("#left-well").children("#target2").length > 0); - text: 其中一个 button 元素应该有 id target3。 testString: assert($("#left-well").children("#target3") && $("#left-well").children("#target3").length > 0); - text: 其中一个 button 元素应该有 id target4。 testString: assert($("#right-well").children("#target4") && $("#right-well").children("#target4").length > 0); - text: 其中一个 button 元素应该有 id target5。 testString: assert($("#right-well").children("#target5") && $("#right-well").children("#target5").length > 0); - text: 其中一个 button 元素应该有 id target6。 testString: assert($("#right-well").children("#target6") && $("#right-well").children("#target6").length > 0); ```
## Challenge Seed
```html

jQuery Playground

#left-well

#right-well

```
## Solution
```html

jQuery Playground

#left-well

#right-well

```