/**
* Toggle logic
*/
- $('.toggle-content').hide()
+ $('.hidden-content').hide()
$('.toggle-header').click(function () {
$(this).toggleClass("open");
$(this).next('.toggle-content').toggle('400');
has_content = False
optional_arguments = 1
option_spec = {
- 'language': directives.unchanged
+ 'language': directives.unchanged
}
def run(self):
class ToggleDirective(Directive):
has_content = True
- option_spec = {'header': directives.unchanged}
+ option_spec = {
+ 'header': directives.unchanged,
+ 'show': directives.flag
+ }
optional_arguments = 1
def run(self):
node = nodes.container()
node['classes'].append('toggle-content')
+ if not "show" in self.options:
+ # This :show: thing is not working, and I fail to see why.
+ # Only the hidden-content class gets a call to hide() in the Javascript,
+ # and :show:n block# still get hidden when I load the page.
+ # No idea what's going on (Mt)
+ node['classes'].append('hidden-content')
par = nodes.container()
par['classes'].append('toggle-header')