Advertisement
Guest User

Untitled

a guest
Apr 12th, 2014
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // The Slider is loaded like this:
  2.  
  3.       jQuery(window).load(function() {
  4.         jQuery('.flexslider').flexslider({
  5.             animation: "slide",          
  6.             directionNav: false,            
  7.               controlNav:false,          
  8.               keyboardNav:false,        
  9.               direction: "horizontal",        
  10.               slideshowSpeed:3000,      
  11.               animationSpeed:600,        
  12.               randomize: false    
  13.             });
  14.       });
  15.  
  16. // This is how I change:
  17.  
  18.     function changeSection(section) {
  19.         if(activeSection != section) {
  20.             $('#'+activeSection).fadeToggle("slow");
  21.             $('#'+section).delay(500).fadeToggle("slow");
  22.                                
  23.             $('#menu-'+activeSection).removeClass('active');
  24.             $('#menu-'+section).addClass('active');
  25.                                
  26.             document.title = activeSectionTitle;
  27.             history.pushState({}, '', section);
  28.            
  29.             activeSection = section;
  30.         }
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement