69 lines
1.2 KiB
Markdown
69 lines
1.2 KiB
Markdown
|
---
|
||
|
id: 587d7fa6367417b2b2512bc3
|
||
|
title: Select a Group of Elements with D3
|
||
|
required:
|
||
|
- src: 'https://cdnjs.cloudflare.com/ajax/libs/d3/4.3.0/d3.min.js'
|
||
|
challengeType: 6
|
||
|
videoUrl: ''
|
||
|
localeTitle: ''
|
||
|
---
|
||
|
|
||
|
## Description
|
||
|
undefined
|
||
|
|
||
|
## Instructions
|
||
|
undefined
|
||
|
|
||
|
## Tests
|
||
|
<section id='tests'>
|
||
|
|
||
|
```yml
|
||
|
tests:
|
||
|
- text: ''
|
||
|
testString: 'assert($("li").text().match(/list item/g).length == 3, "There should be 3 <code>li</code> elements on the page, and the text in each one should say "list item". Capitalization and spacing should match exactly.");'
|
||
|
- text: ''
|
||
|
testString: 'assert(code.match(/d3/g), "Your code should access the <code>d3</code> object.");'
|
||
|
- text: ''
|
||
|
testString: 'assert(code.match(/\.selectAll/g), "Your code should use the <code>selectAll</code> method.");'
|
||
|
|
||
|
```
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Challenge Seed
|
||
|
<section id='challengeSeed'>
|
||
|
|
||
|
<div id='html-seed'>
|
||
|
|
||
|
```html
|
||
|
<body>
|
||
|
<ul>
|
||
|
<li>Example</li>
|
||
|
<li>Example</li>
|
||
|
<li>Example</li>
|
||
|
</ul>
|
||
|
<script>
|
||
|
// Add your code below this line
|
||
|
|
||
|
|
||
|
|
||
|
// Add your code above this line
|
||
|
</script>
|
||
|
</body>
|
||
|
|
||
|
```
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Solution
|
||
|
<section id='solution'>
|
||
|
|
||
|
```js
|
||
|
// solution required
|
||
|
```
|
||
|
</section>
|