The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Programming Fundamentals" Dec 02 - 2:00 PM Eastern

image covering iFrame till clicked

  • # December 10, 2012 at 2:48 pm

    I would like to have an image covering an iframe until the image is clicked.

    I would like the image to fadeout, or just disappear, then the iframe appear.

    How would I go about doing this? Some sort of onClick function?

    # December 10, 2012 at 3:30 pm

    Is this going to be the same image all the time?

    Does the image serve any function other than to hide the iframe?

    # December 10, 2012 at 3:35 pm

    @Paulie_D everytime the page is reloaded it will be the same image. Its purpose is to hide the iFrame because the iFrame has an autoplay for the video that starts right when the page is loaded, and the image on top is to prevent this from happening.

    # December 10, 2012 at 3:45 pm

    …but won’t the video start playing regardless of whether the iframe is visible or not?

    This sounds like a ‘hacky’ solution to something that should be fixed at source.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed