Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $("#left").click(function() {
  2.     var previous =  $(".active").prev();
  3.     var left = $(previous).attr("href");
  4.     var last = $("#gallery a:last-child");
  5.     var first = $("#gallery a:first-child").hasClass("active");
  6.         if(first == true) {
  7.         $(".smallImage").removeClass("active");
  8.  
  9.         $(last).addClass("acitve");
  10.         } else {
  11.         $(".smallImage").removeClass("active");
  12.         $(previous).addClass("active");
  13.         $("#bigImage img").attr("src", left);
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement