Don't abuse the title attribute
This commit is contained in:
@ -79,7 +79,7 @@ var App = React.createClass({
|
|||||||
var rect = sections[i].getBoundingClientRect();
|
var rect = sections[i].getBoundingClientRect();
|
||||||
if (rect.bottom > 0) {
|
if (rect.bottom > 0) {
|
||||||
this.setState({
|
this.setState({
|
||||||
activeSection: sections[i].title
|
activeSection: sections[i].getAttribute('data-title')
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ var Section = React.createClass({
|
|||||||
let { chunk } = this.props;
|
let { chunk } = this.props;
|
||||||
let { left, right, preview } = chunk;
|
let { left, right, preview } = chunk;
|
||||||
return (<div
|
return (<div
|
||||||
title={chunk.title}
|
data-title={chunk.title}
|
||||||
className={`section pad2y contain clearfix ${preview ? 'preview' : ''}`}>
|
className={`section pad2y contain clearfix ${preview ? 'preview' : ''}`}>
|
||||||
<div
|
<div
|
||||||
className='col6 pad2x prose clip'
|
className='col6 pad2x prose clip'
|
||||||
|
Reference in New Issue
Block a user