Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,

I had this code to stream youtube video on fancy box :

javascipt
//Fancybox Yooutube popup
       jQuery(document).ready(function () {

           $(".fancybox-video").click(function () {
               $.fancybox({
                   'padding': 0,
                   'autoScale': false,
                   'transitionIn': 'none',
                   'transitionOut': 'none',
                   'title': this.title,
                   'width': 640,
                   'height': 385,
                   'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
                   'type': 'swf',
                   'swf': {
                       'wmode': 'transparent',
                       'allowfullscreen': 'true'
                   }
               });

               return false;
           });
       });



but I had a problem : jumping to the top of the page when click on the video

how can I fix it ?

I was using this code for fancybox images to prevent jump to the top :

JavaScript
helpers: {
                    overlay: {
                        locked: false
                    }
                }


but actually I do not know where I should put it in this fancybox code.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900