Advertisement
brettshumaker

Test Site Script

Mar 4th, 2013
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.45 KB | None | 0 0
  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. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement