Guest User

Untitled

a guest
Oct 18th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 8.30 KB | None | 0 0
  1. $(document).on("click", ".thumb1", function(){
  2.            
  3.  
  4.            
  5.            
  6.                 if(!$('#thumba1').hasClass("active")) {
  7.                     if(an==0){
  8.                 an=1;
  9.  
  10.                    
  11.                     prev = 4;
  12.                     next = 1;
  13.                     $('#innercontainer2').hide();
  14.                     $('#innercontainer3').hide();
  15.                     $('#innercontainer4').hide();
  16.                     $('#innercontainer5').hide();
  17.                     $('#innercontainer').fadeIn(500);
  18.                     $('#arrowleft').removeClass().addClass(links[prev]);
  19.                     $('#arrowright').removeClass().addClass(links[next]);      
  20.                     $('#imgdiv').animate({ backgroundColor: "#25a647" }, 400);
  21.                     $('.rubrikref').animate({color: "#25a647"},400);
  22.                     $('#thumba2').animate({opacity: 0.0}).css('visibility','hidden');
  23.                     $('#thumba3').animate({opacity: 0.0}).css('visibility','hidden');
  24.                     $('#thumba4').animate({opacity: 0.0}).css('visibility','hidden');
  25.                     $('#thumba5').animate({opacity: 0.0}).css('visibility','hidden');
  26.                     $('#thumba1').css({opacity: 0.0, visibility: "visible"}).animate({opacity: 1.0});
  27.                     $('#thumba2').animate({opacity: 0.0}).css('visibility','hidden');
  28.                     $('#ref1').css('z-index','1');
  29.                     $('#ref2').css('z-index','1');
  30.                     $('#ref3').css('z-index','1');
  31.                     $('#ref4').css('z-index','1');
  32.                     $('#ref5').css('z-index','1');
  33.                    
  34.                     $('#ref1').css('z-index','5').fadeIn("500", function(){
  35.                         $('#ref2').css('z-index','1').hide();
  36.                         $('#ref3').css('z-index','1').hide();
  37.                         $('#ref4').css('z-index','1').hide();
  38.                         $('#ref5').css('z-index','1').hide();
  39.                         an=0;
  40.                     });
  41.                    
  42.                     $('#thumba1').addClass("active");
  43.                     $('#thumba2').removeClass("active");
  44.                     $('#thumba3').removeClass("active");
  45.                     $('#thumba4').removeClass("active");
  46.                     $('#thumba5').removeClass("active");
  47.                    
  48.                 }
  49.             }
  50.            
  51.         });
  52.        
  53.        
  54.         $(document).on("click", ".thumb2", function(){
  55.  
  56.                
  57.            
  58.             if(!$('#thumba2').hasClass("active")) {
  59.                 if(an==0){
  60.             an=1;
  61.  
  62.                 prev=0;
  63.                 next=2;
  64.                
  65.                 $('#innercontainer').hide();
  66.                 $('#innercontainer3').hide();
  67.                 $('#innercontainer4').hide();
  68.                 $('#innercontainer5').hide();
  69.                 $('#innercontainer2').fadeIn(500);
  70.                 $('#arrowleft').removeClass().addClass(links[prev]);
  71.                 $('#arrowright').removeClass().addClass(links[next]);
  72.                 $('#imgdiv').animate({ backgroundColor: "#ff9800" }, 400);
  73.                 $('.rubrikref').animate({color: "#ff9800"},400);
  74.                 $('#thumba1').animate({opacity: 0.0}).css('visibility','hidden');
  75.                 $('#thumba3').animate({opacity: 0.0}).css('visibility','hidden');
  76.                 $('#thumba4').animate({opacity: 0.0}).css('visibility','hidden');
  77.                 $('#thumba5').animate({opacity: 0.0}).css('visibility','hidden');
  78.                 $('#thumba2').css({opacity: 0.0, visibility: "visible"}).animate({opacity: 1.0});
  79.                    
  80.                     $('#ref1').css('z-index','1');
  81.                     $('#ref2').css('z-index','1');
  82.                     $('#ref3').css('z-index','1');
  83.                     $('#ref4').css('z-index','1');
  84.                     $('#ref5').css('z-index','1');
  85.                    
  86.                     $('#ref2').css('z-index','5').fadeIn("500", function(){
  87.                         $('#ref1').css('z-index','1').hide();
  88.                         $('#ref3').css('z-index','1').hide();
  89.                         $('#ref4').css('z-index','1').hide();
  90.                         $('#ref5').css('z-index','1').hide();
  91.                         an=0;
  92.                     });
  93.                 $('#thumba2').addClass("active");
  94.                 $('#thumba1').removeClass("active");
  95.                 $('#thumba3').removeClass("active");
  96.                 $('#thumba4').removeClass("active");
  97.                 $('#thumba5').removeClass("active");
  98.                
  99.             }
  100.            
  101.             }
  102.            
  103.         });
  104.        
  105.        
  106.                 $(document).on("click", ".thumb3", function(){
  107.                
  108.            
  109.            
  110.                 if(!$('#thumba3').hasClass("active")) {
  111.                     if(an==0){
  112.                 an=1;
  113.  
  114.                    
  115.                     prev=1;
  116.                     next=3;
  117.                     $('#innercontainer').hide();
  118.                     $('#innercontainer2').hide();
  119.                     $('#innercontainer4').hide();
  120.                     $('#innercontainer5').hide();
  121.                     $('#innercontainer3').fadeIn(500);
  122.                     $('#arrowleft').removeClass().addClass(links[prev]);
  123.                     $('#arrowright').removeClass().addClass(links[next]);      
  124.                     $('#imgdiv').animate({ backgroundColor: "#870301" }, 400);
  125.                     $('.rubrikref').animate({color: "#870301"},400);
  126.                     $('#thumba1').animate({opacity: 0.0}).css('visibility','hidden');
  127.                     $('#thumba2').animate({opacity: 0.0}).css('visibility','hidden');
  128.                     $('#thumba4').animate({opacity: 0.0}).css('visibility','hidden');
  129.                     $('#thumba5').animate({opacity: 0.0}).css('visibility','hidden');
  130.                     $('#thumba3').css({opacity: 0.0, visibility: "visible"}).animate({opacity: 1.0});
  131.                    
  132.                     $('#ref1').css('z-index','1');
  133.                     $('#ref2').css('z-index','1');
  134.                     $('#ref3').css('z-index','1');
  135.                     $('#ref4').css('z-index','1');
  136.                     $('#ref5').css('z-index','1');
  137.                     $('#ref3').css('z-index','5').fadeIn("500", function(){
  138.                         $('#ref1').css('z-index','1').hide();
  139.                         $('#ref2').css('z-index','1').hide();
  140.                         $('#ref4').css('z-index','1').hide();
  141.                         $('#ref5').css('z-index','1').hide();
  142.                         an=0;
  143.                     });
  144.                    
  145.                     $('#thumba3').addClass("active");
  146.                     $('#thumba1').removeClass("active");
  147.                     $('#thumba2').removeClass("active");
  148.                     $('#thumba4').removeClass("active");
  149.                     $('#thumba5').removeClass("active");
  150.                    
  151.                 }
  152.             }
  153.         });
  154.         $(document).on("click", ".thumb4", function(){
  155.        
  156.            
  157.            
  158.                 if(!$('#thumba4').hasClass("active")) {
  159.                     if(an==0){
  160.                 an=1;
  161.  
  162.                    
  163.                     prev=2;
  164.                     next=4;
  165.                     $('#innercontainer').hide();
  166.                     $('#innercontainer2').hide();
  167.                     $('#innercontainer3').hide();
  168.                     $('#innercontainer5').hide();
  169.                     $('#innercontainer4').fadeIn(500);
  170.                     $('#arrowleft').removeClass().addClass(links[prev]);
  171.                     $('#arrowright').removeClass().addClass(links[next]);      
  172.                     $('#imgdiv').animate({ backgroundColor: "#1a1a1a" }, 400);
  173.                     $('.rubrikref').animate({color: "#1a1a1a"},400);
  174.                     $('#thumba2').animate({opacity: 0.0}).css('visibility','hidden');
  175.                     $('#thumba3').animate({opacity: 0.0}).css('visibility','hidden');
  176.                     $('#thumba5').animate({opacity: 0.0}).css('visibility','hidden');
  177.                     $('#thumba1').animate({opacity: 0.0}).css('visibility','hidden');
  178.                     $('#thumba4').css({opacity: 0.0, visibility: "visible"}).animate({opacity: 1.0});
  179.                    
  180.                     $('#ref1').css('z-index','1');
  181.                     $('#ref2').css('z-index','1');
  182.                     $('#ref3').css('z-index','1');
  183.                     $('#ref4').css('z-index','1');
  184.                     $('#ref5').css('z-index','1');
  185.                     $('#ref4').css('z-index','5').fadeIn("500", function(){
  186.                         $('#ref1').css('z-index','1').hide();
  187.                         $('#ref2').css('z-index','1').hide();
  188.                         $('#ref3').css('z-index','1').hide();
  189.                         $('#ref5').css('z-index','1').hide();
  190.                         an=0;
  191.                     });
  192.                     $('#thumba4').addClass("active");
  193.                     $('#thumba1').removeClass("active");
  194.                     $('#thumba2').removeClass("active");
  195.                     $('#thumba3').removeClass("active");
  196.                     $('#thumba5').removeClass("active");
  197.                    
  198.                 }
  199.             }
  200.         });
  201.         $(document).on("click", ".thumb5", function(){
  202.        
  203.            
  204.            
  205.                 if(!$('#thumba5').hasClass("active")) {
  206.                     if(an==0){
  207.                 an=1;
  208.  
  209.                    
  210.                     prev=3;
  211.                     next=0;
  212.                     $('#innercontainer').hide();
  213.                     $('#innercontainer2').hide();
  214.                     $('#innercontainer3').hide();
  215.                     $('#innercontainer4').hide();
  216.                     $('#innercontainer5').fadeIn(500);
  217.                     $('#arrowleft').removeClass().addClass(links[prev]);
  218.                     $('#arrowright').removeClass().addClass(links[next]);      
  219.                     $('#imgdiv').animate({ backgroundColor: "#2d83d0" }, 400);
  220.                     $('.rubrikref').animate({color: "#2d83d0"},400);
  221.                     $('#thumba2').animate({opacity: 0.0}).css('visibility','hidden');
  222.                     $('#thumba3').animate({opacity: 0.0}).css('visibility','hidden');
  223.                     $('#thumba4').animate({opacity: 0.0}).css('visibility','hidden');
  224.                     $('#thumba1').animate({opacity: 0.0}).css('visibility','hidden');
  225.                     $('#thumba5').css({opacity: 0.0, visibility: "visible"}).animate({opacity: 1.0});
  226.                    
  227.                    
  228.                     $('#ref1').css('z-index','1');
  229.                     $('#ref2').css('z-index','1');
  230.                     $('#ref3').css('z-index','1');
  231.                     $('#ref4').css('z-index','1');
  232.                     $('#ref5').css('z-index','1');
  233.                     $('#ref5').css('z-index','5').fadeIn("500", function(){
  234.                         $('#ref1').css('z-index','1').hide();
  235.                         $('#ref2').css('z-index','1').hide();
  236.                         $('#ref3').css('z-index','1').hide();
  237.                         $('#ref4').css('z-index','1').hide();
  238.                         an=0;
  239.                     });
  240.                     $('#thumba5').addClass("active");
  241.                     $('#thumba1').removeClass("active");
  242.                     $('#thumba2').removeClass("active");
  243.                     $('#thumba3').removeClass("active");
  244.                     $('#thumba4').removeClass("active");
  245.                    
  246.                 }
  247.             }
  248.         });
Add Comment
Please, Sign In to add comment