Guest User

post-gallery-slider/templates/footer.php (inactive)

a guest
Mar 29th, 2015
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. <script type="text/javascript">
  2. jQuery(document).ready(function($) {
  3. if (typeof $.fn.sudoSlider != "undefined") {
  4. $(".gallery").each(function() {
  5. var gal = this,
  6. touch = $("html.touch").size() > 0;
  7. var sudoSlider = $(".gallery-slider", gal).show().sudoSlider({
  8. prevNext: false,
  9. continuos: true,
  10. touch: touch,
  11. effect: "slide",
  12. initCallback: function() {
  13. $(".gallery-thumbs a", gal).removeClass("active");
  14. $(".gallery-thumbs a:first", gal).addClass("active");
  15. },
  16. afteranimation: function(t) {
  17. $(".gallery-thumbs a", gal).removeClass("active");
  18. $(".gallery-thumbs a:eq("+(t-1)+")", gal).addClass("active");
  19. }
  20. });
  21. $(".gallery-thumbs a", gal).click(function(event) {
  22. event.preventDefault();
  23. sudoSlider.goToSlide(($(this).parent().index()+1))
  24. return false;
  25. });
  26. if (!touch) {
  27. $(".gallery-slider img", gal).click(function(event) {
  28. event.preventDefault();
  29. sudoSlider.goToSlide("next");
  30. return false;
  31. });
  32. }
  33. });
  34. }
  35. });
  36. </script>
Advertisement
Add Comment
Please, Sign In to add comment