Hi all!
if you want all the items collapsed, add this line:
if (Drupal.jsEnabled) {
$(document).ready(function(){
$(this).find('.panel-pane > .content').hide();
$('div.panel-display div.panel-pane-collapsible').each(function() {
$(this).find('.panel-pane > h2.title').click(function() {
$(this).toggleClass('collapsed');
$(this).next('.content').toggleClass('collapsed').slideToggle('slow');
});
});
});
}
greetings,
Comments
Comment #1
joachim commentedYour jquery selector appears to hit *any* pane, even those without this style applied. Which means there is then no way to expand them again.
So I'm not sure I understand what you mean.
Do you mean that you want all the *collapsible* panes to be initially collapsed?
I've coded the basics for this but I want to make it a setting -- if such a thing is even possible, I'm not sure individual pane styles can have settings. If you can help with that bit of coding it would be appreciated :)
Comment #2
quinti commentedHi Joachim
yes, that is, was my little and not very well solution for get "all the *collapsible* panes to be initially collapsed"
as here: http://www.juarezabogados.es/abogados
at momment i haven't idea for help you..., sorry, when i know, yes
greetings!
Comment #3
julien.reulos commentedHello,
As Quinti I needed that the panes be initially collapsed, but not all of them, just some of those marked as "collapsed" at admin/panels/panel-page/*/edit/content, and then be expanded at the first click.
In order to obtain this behaviour I adapt the panels_collapse.js file to my needs, and it's a manual solution, as it's necessary to list all the panes you want to initially display collapsed:
In my case, I hide 2 panes: the comments list and the comment form of the full node page. The content is hidden but the title is still visible, so that the pane can be expanded.
Many thanks for your module !
Comment #4
WorldFallz commentednot adding new features to d5.