Want more features on Pastebin? Sign Up, it's FREE!
Guest

Test Site Script

By: brettshumaker on Mar 4th, 2013  |  syntax: jQuery  |  size: 0.45 KB  |  views: 182  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. jQuery(document).ready(function($) {
  2.         $('[rel=show-staff]').click(function(){
  3.                 $this = $(this);
  4.                 var the_class = $this.attr("class");
  5.                 if (!$('#'+the_class).hasClass('turned-on')){
  6.                         $('#'+the_class).fadeToggle();
  7.                         $('.turned-on').fadeToggle();
  8.                        
  9.                         $('.turned-on').removeClass('turned-on');
  10.                         $('#'+the_class).addClass('turned-on');
  11.                 } else {
  12.                         $('.turned-on').fadeToggle();
  13.                         $('.turned-on').removeClass('turned-on');
  14.                 }
  15.         });    
  16. });
clone this paste RAW Paste Data