Plz refer this, http://it-blog.club/fancybox-iframe/
just translate the page and that's how-to.
<script type="text/javascript">
$(document).ready(function() {
$("#sia").click(function() {
$.fancybox({
'padding' : 0,
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'title' : this.title,
'width' : 720,
'height' : 405,
'href' : this.href,
'type' : 'iframe',
'iframe': {
'scrolling': 'auto',
'preload': true
}
// 'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
// 'type' : 'swf',
// 'swf' : {
// 'wmode' : 'transparent',
// 'allowfullscreen' : 'true'
// }
});
return false;
});
});
</script>
<div class="float_l imgdiv"><a id="sia" class="event iframe" title="" href="https://www.youtube.com/embed/ABCDefgHIJKlmn"><img class="imgbox" alt="" src="/imgdir/image.jpg"><br>Link Text</a></div>
The commented lines are the previous codes that worked well before Youtube stopped supporting ㄻAdobe Flash(SWF) embedding.
The attributes of 'href', 'type', and 'iframe' are modified.
Now it works fine with the new URL format for embedding like https://www.youtube.com/embed/ABCDefgHIJKlmn
Thank you it-blog.club!
피드 구독하기:
댓글 (Atom)
Xubuntu: Installing a Printer (Canon G3060 PIXMA)
$ sudo apt install system-config-printer Download the proper driver for linux from Canon website. Turn on the printer and set up its WiFi. C...
-
$ sudo apt install system-config-printer Download the proper driver for linux from Canon website. Turn on the printer and set up its WiFi. C...
-
https://askubuntu.com/questions/1056386/how-do-i-backup-all-gnome-tweaks-configuration From the terminal, execute the following to save y...
-
Put your ' My_Color_Scheme.vim ' file in ~/.vim/colors/ Add the code below into your ~/.vimrc if &term =~ "xterm" ...
댓글 없음:
댓글 쓰기