How to preload iframe

后端 未结 2 947
[愿得一人]
[愿得一人] 2021-01-13 17:37
function toggle(){
    $(\"#tempc\").toggle(
        function () {
            $(\"#tempc\").animate({width: 255, height: 220}, 1000);
            $(\"#tempc\").html         


        
2条回答
  •  礼貌的吻别
    2021-01-13 18:01

    With JQuery, you don't need to use iframes. Take a look at the .load() function. http://api.jquery.com/load

    i.e.

    $('#tempc').load('src/stream.php?stream=1');
    

    To preload a page, just create a hidden div and show it when ready.

    var stream2 = $('
    ').load('src/stream.php?stream=2').hide(); $('#tempc').html(stream2.html());

提交回复
热议问题