Guest User

Untitled

a guest
Jan 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1.  
  2. $('ul.gallery_demo').galleria({
  3. history: false,
  4. clickNext: false,
  5. insert: '#main_image',
  6. onImage: function (image, caption, thumb) {
  7. image.css('display', 'none').fadeIn(300);
  8. caption.css('display', 'none');
  9. var _li = thumb.parents('li');
  10. _li.siblings().children('img.selected').stop(true, true).fadeTo(500, 0.2);
  11. thumb.fadeTo('fast', 1).addClass('selected');
  12. $("a#prev, a#next").css("height", "655px");
  13. var math = parseInt(image.width()) + ((1017 - parseInt(image.width())) / 2);
  14. $("#btn-holder").css("margin-left", math + "px");
  15. $("#info-box").css("margin-left", (math - 152) + "px").hide();
  16. },
  17. onThumb: function (thumb) {
  18. var _li = thumb.parent();
  19. var _fadeTo = _li.hasClass('.active') ? '1' : '0.2';
  20. thumb.fadeTo(1000, _fadeTo);
  21. thumb.hover(function () {
  22. thumb.fadeTo('fast', 1);
  23. }, function () {
  24. _li.not('.active').children('img').stop(true, true).fadeTo('fast', 0.2);
  25. })
  26. }
  27. });
  28. $("ul.thumbs li:first").addClass('active');
  29. $("a#prev, a#next").fadeTo(1, 0.2);
  30. $("a#prev, a#next").hover(function () {
  31. $(this).stop(true, true).fadeTo(500, 1);
  32. }, function () {
  33. $(this).fadeTo("fast", 0.2);
  34. });
Add Comment
Please, Sign In to add comment