jQuery - Page Component - Gallery


/ Published in: jQuery
Save to your folder(s)

jQuery - Page Component - Gallery Fancybox


Copy this code and paste it in your HTML
  1. $("a.fancyimage").fancybox({
  2. 'transitionIn' : 'elastic',
  3. 'transitionOut' : 'elastic',
  4. 'speedIn' : 300,
  5. 'speedOut' : 300,
  6. 'overlayShow' : true,
  7. 'overlayOpacity': 0.7,
  8. 'overlayColor' : "#000"
  9. });
  10.  
  11. $("a.fancyyoutube").click(function() {
  12. $.fancybox({
  13. 'padding': 0,
  14. 'overlayShow' : true,
  15. 'overlayOpacity': 0.7,
  16. 'overlayColor' : "#000",
  17. 'autoScale': true,
  18. 'transitionIn': 'elastic',
  19. 'transitionOut': 'elastic',
  20. 'speedIn': 300,
  21. 'speedOut':300,
  22. 'title': this.title,
  23. 'width': 680,
  24. 'height': 495,
  25. 'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
  26. 'type': 'swf',
  27. 'swf': {
  28. 'wmode': 'transparent',
  29. 'allowfullscreen': 'true'
  30. }
  31. });
  32.  
  33. return false;
  34. });
  35.  
  36. $("a.fancyvimeo").click(function() {
  37. $.fancybox({
  38. 'padding': 0,
  39. 'overlayShow' : true,
  40. 'overlayOpacity': 0.7,
  41. 'overlayColor' : "#000",
  42. 'autoScale': true,
  43. 'transitionIn': 'elastic',
  44. 'transitionOut': 'elastic',
  45. 'speedIn': 300,
  46. 'speedOut':300,
  47. 'title': this.title,
  48. 'width': 680,
  49. 'height': 495,
  50. 'href': this.href.replace(new RegExp("([0-9])", "i"), 'moogaloop.swf?clip_id=$1'),
  51. 'type': 'swf'
  52. });
  53.  
  54. return false;
  55. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.