mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
467 B
18 lines
467 B
#= require views/pages/simple
|
|
|
|
class app.views.SqlitePage extends app.views.SimplePage
|
|
@events:
|
|
click: 'onClick'
|
|
|
|
onClick: (event) =>
|
|
return unless id = event.target.getAttribute('data-toggle')
|
|
return unless el = @find("##{id}")
|
|
$.stopEvent(event)
|
|
if el.style.display == 'none'
|
|
el.style.display = 'block'
|
|
event.target.textContent = 'hide'
|
|
else
|
|
el.style.display = 'none'
|
|
event.target.textContent = 'show'
|
|
return
|