[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/themes/myzen/ -> script.js (source)

   1  // $Id$
   2  
   3  /**
   4   * Hide blocks in sidebars, then make them visible at the click of a button.
   5   */
   6  if (Drupal.jsEnabled) {
   7    $(document).ready(function() {
   8                        // Get all div elements of class block inside the right sidebar.
   9                        var blocks = $('#sidebar-right div.sidebar-hide');
  10                        var blocks2 = $('tr.sidebar-hide');
  11                        // Get title :before
  12                        var bl_content = $('.content h4.title#collapsibutton, .content h4.title#collapsibutton1');
  13                        var bl_content2 = $('.content h4.title#collapsibutton2');
  14                        // Hide them.
  15                        blocks.hide();
  16                        blocks2.hide();
  17  
  18      // Add a handler that runs when the button is clicked.
  19      $('#collapsibutton').click( function() {
  20                                    blocks.slideToggle("slow");
  21                                    bl_content.toggleClass("visible");
  22  
  23                                    
  24      });
  25      $('#collapsibutton2').click( function() {
  26                                  blocks2.slideToggle("slow");
  27                                  bl_content2.toggleClass("visible");
  28      });
  29    });
  30  }


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7