Advertisement
AndreasFurster

Untitled

Jul 3rd, 2014
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.08 KB | None | 0 0
  1. // ME!
  2. $('.cellhead', $('.cellpane')).click(function(){
  3.                     $('.cellhead', $('.cellpane'))
  4.                         .not($(this))
  5.                         .siblings('.cellctn')
  6.                         .slideUp();
  7.                        
  8.                     $(this)
  9.                         .siblings('.cellctn')
  10.                         .slideToggle();
  11.                 });
  12.  
  13. // VS ROY!
  14.  
  15. $('.leftPane').children('.cellpane').first().addClass('active');
  16.                 $('.leftPane').children('.cellpane').first().children('.cellctn').toggle();
  17.                 $('.cellpane').click(function(){
  18.  
  19.                     if($('body').find('.active').length != 1){
  20.                         $(this).children('.cellctn').first().slideToggle();
  21.                         $(this).addClass('active');
  22.                         /*if($(this).children('.cellctn').first().hasClass('active')){
  23.                             $(this).children('.cellctn').first().
  24.                         }*/
  25.                     }
  26.                     else{
  27.                         $(this).children('.cellctn').first().slideToggle();
  28.                         $('.active').children('.cellctn').first().slideToggle();
  29.                         $('.active').removeClass('active');
  30.                         if($(this).hasClass('active')){
  31.                             $(this).children('.cellctn').first().removeClass('active');
  32.                         }
  33.                         else{
  34.                             $(this).addClass('active');
  35.                         }
  36.                        
  37.                     }
  38.                 });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement