Adding a URL to an Iframe being called by Fancybox2-AJAX Based on the Iframe's ID
问题 Okay I have this working minus the fact of having this working once I call in with fancybox via AJAX. Static Example Works: <iframe id="videourl1" width="640" height="340" src="" frameBorder="0"></iframe> <iframe id="videourl2" width="640" height="340" src="" frameBorder="0"></iframe> <iframe id="videourl3" width="640" height="340" src="" frameBorder="0"></iframe> $("div.video-container iframe").each(function(){var idAdd=$(this).attr("id");$(this).attr("src","http://www.youtube.com/embed/"