made with esnextbin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gifsicle -O3 image13.gif -o image13-opt.gif --colors 64 --scale 0.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="box"> | |
| <span class="t box-inner">div + span</span> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class HasTooltip extends React.Component { | |
| /* … */ | |
| _renderPlaceholder() { | |
| return ( | |
| <div className="has-tooltip" | |
| onMouseEnter={this._setHovered} | |
| onMouseLeave={this._setNotHovered} | |
| ></div> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* non-hovered */ | |
| <div className="has-tooltip" | |
| onMouseEnter={this._setHovered} | |
| onMouseLeave={this._setNotHovered} | |
| ></div> | |
| /* hovered */ | |
| <div className="tooltip-region"> | |
| <div className="has-tooltip" | |
| onMouseEnter={this._setHovered} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div className="tooltip-region" | |
| onMouseLeave={this._setNotHovered} | |
| <div className="has-tooltip" | |
| onMouseEnter={this._setHovered}></div> | |
| <div>Hello</div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Best practice, to maintain a similar DOM shape | |
| render() { | |
| const {isHovered} = this.state; | |
| return ( | |
| <div className={classNames(isHovered && 'tooltip-region')} | |
| onMouseEnter={this._setHovered} | |
| onMouseLeave={this._setNotHovered}> | |
| <div className="has-tooltip"></div> | |
| {isHovered && <div>Hello</div>} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Rx = require('rx'); | |
| var clone = require('lodash.clone'); | |
| var isequal = require('lodash.isequal'); | |
| var Config = new MutableSubject({a: null}); | |
| var Options = new MutableSubject({}); | |
| function MutableSubject(name, obj) { | |
| var behaviorSubject = new Rx.BehaviorSubject(obj); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Container = React.createClass({ | |
| getInitialState: function () { | |
| return { | |
| contentComponent: ContentA, | |
| headerProps: null | |
| }; | |
| }, | |
| _toggleContent: function () { |
Seed for a blog article to convert from jQuery to jqLite.
Finding all the bad usages of selectors in find and bad css calls.