File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 1
1
// DOM API
2
2
var clickMe = document . getElementById ( 'click-me' ) ;
3
- clickMe . onclick = ( ) => {
4
- if ( this . style . backgroundColor ) {
5
- this . style . backgroundColor = '' ;
6
- } else {
7
- this . style . backgroundColor = 'red' ;
8
- }
3
+ clickMe . onclick = function ( ) {
4
+ if ( this . style . backgroundColor ) {
5
+ this . style . backgroundColor = '' ;
6
+ } else {
7
+ this . style . backgroundColor = 'red' ;
8
+ }
9
9
}
10
10
11
11
// D3 Selection API. Note: it attaches the
12
12
// callbacks to each element in the selection
13
13
d3 . selectAll ( '.hover-me' )
14
- . on ( 'mouseover' , ( ) => {
15
- this . style . backgroundColor = 'yellow' ;
16
- } )
17
- . on ( 'mouseleave' , ( ) => {
18
- this . style . backgroundColor = '' ;
19
- } ) ;
14
+ . on ( 'mouseover' , function ( ) {
15
+ this . style . backgroundColor = 'yellow' ;
16
+ } )
17
+ . on ( 'mouseleave' , function ( ) {
18
+ this . style . backgroundColor = '' ;
19
+ } ) ;
Original file line number Diff line number Diff line change 10
10
< link rel ="stylesheet " href ="{{ "/css/syntax.css" | prepend: site.baseurl }}">
11
11
< link rel ="stylesheet " href ="{{ "/css/graph.css" | prepend: site.baseurl }}">
12
12
13
- < script type ="text/javascript " src ="{{ "/javascripts/d3.v4 .min.js" | prepend: site.baseurl }}"> </ script >
13
+ < script type ="text/javascript " src ="{{ "/javascripts/d3.v5 .min.js" | prepend: site.baseurl }}"> </ script >
14
14
</ head >
Original file line number Diff line number Diff line change @@ -184,8 +184,8 @@ on the styling.
184
184
185
185
<div class =" example-row-2 " >
186
186
<div class =" example " >
187
- {% highlight html
188
- %} {% include examples/svg2.svg %}
187
+ {% highlight html %}
188
+ {% include examples/svg2.svg %}
189
189
{% endhighlight %}
190
190
</div >
191
191
You can’t perform that action at this time.
0 commit comments