Created
September 8, 2013 23:15
-
-
Save rpominov/6489439 to your computer and use it in GitHub Desktop.
impossibear.js concept
This file contains 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="js-spoiler"> | |
<button class="js-toggle">скрыть/показать</button> | |
<p class="js-content">контент контент контент</p> | |
</div> | |
catbug """ | |
.js-spoiler | |
.js-toggle | |
.js-content | |
""", -> | |
@content.hide() | |
@toggle.click => @content.toggle() | |
------------------------------ VS ------------------------------ | |
<div data-block="spoiler"> | |
<button data-element="toggle">скрыть/показать</button> | |
<p data-element="content">контент контент контент</p> | |
</div> | |
impossibear 'spoiler', -> | |
@content.hide() | |
@toggle.click => @content.toggle() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment