>
> Hello,
>
> I have a couple of hidden divs with iframes linked to external sites
> using the "display:none" css tag.  They are then revealed using a
> button.  The problem is that the hidden divs load the iframe content
> even if the buttons are never clicked causing a very slow page load.
> Is there anyway using jquery to only load the Iframe only when the div
> is revealed?  Any help would be appreciated.
>
> Thanks
>

Have the initial source as an empty page on your own server, then use

$("#buttonName").click(function() {
  $("#iFrameName").load(function() {
    $(this).show();
  });
  $("#iFrameName").attr("src","http://someserver/somepage.html";);
});

Reply via email to