1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Iframe onload

Discussion in 'PHP & Perl' started by akwin4565, Mar 9, 2014.

  1. akwin4565

    akwin4565 Junior Member

    Joined:
    Dec 1, 2013
    Messages:
    135
    Likes Received:
    7
    Location:
    in front of bhw
    I have a wordpress site in which i have an iframe.I want the iframe to be loaded first.Is there any code for this.Thanks in advance.
     
  2. DaQuark

    DaQuark Junior Member

    Joined:
    Jun 4, 2011
    Messages:
    130
    Likes Received:
    43
    Location:
    home sweet home
    I don't think it will work unless you place the iframe before the entire content. put the iframe first and then the other html elements ...
     
  3. x00srch

    x00srch Registered Member

    Joined:
    Jul 2, 2013
    Messages:
    53
    Likes Received:
    15
    Location:
    Berlin, Germany
    With jQuery:
    Code:
    $(function(){
      $('#IFrame-Name').load(function() {
        $('#Container-Name').show();
        $('#IFrame-Name').unbind('load');
      });
    });
    
     
  4. akwin4565

    akwin4565 Junior Member

    Joined:
    Dec 1, 2013
    Messages:
    135
    Likes Received:
    7
    Location:
    in front of bhw
    Where do I place the iframe?
     
  5. I Make Dollars

    I Make Dollars BANNED BANNED

    Joined:
    May 4, 2014
    Messages:
    175
    Likes Received:
    91
    give your iframe the id of "IFrame-Name" and use x00srch code. Should work fine.