Skip to content

Instantly share code, notes, and snippets.

@rpominov
Created September 8, 2013 23:15
Show Gist options
  • Save rpominov/6489439 to your computer and use it in GitHub Desktop.
Save rpominov/6489439 to your computer and use it in GitHub Desktop.
impossibear.js concept
<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