Panel Collapse

Events happening in the community are now at Drupal community events on www.drupal.org.
st53182's picture

Hello professionals,

I need some help with module Panel Collapse
Shortly about the situation:
I am using Views+Ctools+Panels+Panel Collapse, the idea is to create a menu with Panel Page.

if (Drupal.jsEnabled) {
$(document).ready(function(){
   var defTbodyDisplay = $('tbody').css('display');
   $('div.panel-display div.panel-pane-collapsible').each(function(){
     $(this).find('th.views-field-title').mouseover(function(){
       $(this).toggleClass('collapsed');
       $(this).parent().parent().parent().children('tbody').toggleClass('collapsed').slideToggle('normal',
function(){
         if(! $(this).hasClass('collapsed')) {
           $(this).css({'display': defTbodyDisplay});
         }
       });
     });
   });
});
}

The problem is that the basic state of panel is opened, but i need that from the beginning it was already closed, and only after the
mouseover event it opened.
tsi.sydex.ru - the test site with this problem.

Comments

What about .hover()

esod's picture

What about the .hover() method? Something like this:

Drupal.behaviors.myNameSpace = function (context) {
  $('tbody').show();
  $('div#panel div.panel-pane-collapsible').hover(
    function(){
      $(this).addClass('collapsed');
    },
    function(){
      $(this).removeClass('collapsed');
    }
  );
}

Panels

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: