Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * 静止画像に動画のURLを埋め込んでおき、
- * クリックしたらiframeを表示して動画を読み込み、画像は非表示にして入れ替える
- */
- $('.sampleMovieArea').on('click', 'img.sampleMovie', function() {
- var url = $(this).attr('data-url');
- $(this).parent('.sampleMovieArea').find("iframe").attr("src", url).removeClass('d-none');
- $(this).addClass('d-none');
- });
Add Comment
Please, Sign In to add comment