What would you think of a spoiler that instead of using a div in display block uses an inline element and instead of apply display:none changes the visibility of the content?
The main advantage would be that the text remains fully inline (unless otherwise done inside the block) and also the text around doesn't jump here and there revealing/hiding the spoiler.
I found this little piece for jquery:
http://stackoverflow.com/questions/9614622/equivalent-of-jquery-hide-to-set-visibility-hidden
The changes to the current system would be to add:
.spoiler, .bbc_spoiler {
display: inline;
}
to index.css
Then the bit of javascript:
jQuery.fn.toggleVisibility = function() {
return this.css('visibility', function(i, visibility) {
return (visibility == 'visible') ? 'hidden' : 'visible';
});
};
somewhere always present (probably elk_jquery_plugins.js).
And finally change:
$(this).next().children().slideToggle("fast");
to:
$(this).next().children().toggleVisibility();
in both topic.js and theme.js
Last little tweak should be to remove the border from the variant css:
.spoiler {
border: 1px solid #ccc;
padding: 0.3em;
background-color: #eee;
}
to:
.spoiler {
padding: 0.3em;
background-color: #eee;
}