/ Published in: jQuery
jQuery - Page Component - Gallery Fancybox
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$("a.fancyimage").fancybox({ 'transitionIn' : 'elastic', 'transitionOut' : 'elastic', 'speedIn' : 300, 'speedOut' : 300, 'overlayShow' : true, 'overlayOpacity': 0.7, 'overlayColor' : "#000" }); $("a.fancyyoutube").click(function() { $.fancybox({ 'padding': 0, 'overlayShow' : true, 'overlayOpacity': 0.7, 'overlayColor' : "#000", 'autoScale': true, 'transitionIn': 'elastic', 'transitionOut': 'elastic', 'speedIn': 300, 'speedOut':300, 'title': this.title, 'width': 680, 'height': 495, 'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'), 'type': 'swf', 'swf': { 'wmode': 'transparent', 'allowfullscreen': 'true' } }); return false; }); $("a.fancyvimeo").click(function() { $.fancybox({ 'padding': 0, 'overlayShow' : true, 'overlayOpacity': 0.7, 'overlayColor' : "#000", 'autoScale': true, 'transitionIn': 'elastic', 'transitionOut': 'elastic', 'speedIn': 300, 'speedOut':300, 'title': this.title, 'width': 680, 'height': 495, 'href': this.href.replace(new RegExp("([0-9])", "i"), 'moogaloop.swf?clip_id=$1'), 'type': 'swf' }); return false; });