Solved

PLay youtube video on top of an image when its clicked

Posted on 2011-03-10
4
253 Views
Last Modified: 2012-05-11
Hello

I have the following code which is basically a carrousel in javascript made by my designer.
I want that when the user clicks on an image, it plays a youtube video on top of the image.

This carrousel is dinamycally rendered from sharepoint data, so dont worry for that

      <div id="tabs" class="group">
            <ol id="tabs-nav">
          <li><asp:HyperLink ID="Tab1" runat="server" NavigateUrl="#tab1"></asp:HyperLink></li>
          <li><asp:HyperLink ID="Tab2" runat="server" NavigateUrl="#tab2"></asp:HyperLink></li>
          <li><asp:HyperLink ID="Tab3" runat="server" NavigateUrl="#tab3"></asp:HyperLink></li>
          <li><asp:HyperLink ID="Tab4" runat="server" NavigateUrl="#tab4"></asp:HyperLink></li>
          <li><asp:HyperLink ID="Tab5" runat="server" NavigateUrl="#tab5"></asp:HyperLink></li>
          <li><asp:HyperLink ID="Tab6" runat="server" NavigateUrl="#tab6"></asp:HyperLink></li>
        </ol>
        <ol id="tabs-panes">
              <li id="tab1">
                <div class="images">
                <asp:ImageButton ID="ImageButton1" runat="server" width="680" height="300" />
            </div>
            <div class="info">
                  <blockquote>
                    <p><span>&lsquo;&lsquo;</span><asp:Literal ID="BlockQuote1" runat="server"></asp:Literal>&rsquo;&rsquo;</p>
              </blockquote>
              <cite><asp:Label ID="Cite1" runat="server"></asp:Label></cite>
            </div>
            <a href="#" class="video">Ga verder</a>
          </li>
          <li id="tab2">
                <div class="images">
                <asp:ImageButton ID="ImageButton2" runat="server" width="680" height="300" />
            </div>
            <div class="info">
                  <blockquote>
                    <p><span>&lsquo;&lsquo;</span><asp:Literal ID="BlockQuote2" runat="server"></asp:Literal>&rsquo;&rsquo;</p>
              </blockquote>
              <cite><asp:Label ID="Cite2" runat="server"></asp:Label></cite>
            </div>
            <a href="#">Ga verder</a>
          </li>
          <li id="tab3">
                <div class="images">
                <asp:ImageButton ID="ImageButton3" runat="server" width="680" height="300" />
            </div>
            <div class="info">
                  <blockquote>
                    <p><span>&lsquo;&lsquo;</span><asp:Literal ID="BlockQuote3" runat="server"></asp:Literal>&rsquo;&rsquo;</p>
              </blockquote>
              <cite><asp:Label ID="Cite3" runat="server"></asp:Label></cite>
            </div>
            <a href="#" class="video">Ga verder</a>
          </li>
          <li id="tab4">
                <div class="images">
                <asp:ImageButton ID="ImageButton4" runat="server" width="680" height="300" />
            </div>
            <div class="info">
                  <blockquote>
                    <p><span>&lsquo;&lsquo;</span><asp:Literal ID="BlockQuote4" runat="server"></asp:Literal>&rsquo;&rsquo;</p>
              </blockquote>
              <cite><asp:Label ID="Cite4" runat="server"></asp:Label></cite>
            </div>
            <a href="#">Ga verder</a>
          </li>
          <li id="tab5">
                <div class="images">
                <asp:ImageButton ID="ImageButton5" runat="server" width="680" height="300" />
            </div>
            <div class="info">
                  <blockquote>
                    <p><span>&lsquo;&lsquo;</span><asp:Literal ID="BlockQuote5" runat="server"></asp:Literal>&rsquo;&rsquo;</p>
              </blockquote>
              <cite><asp:Label ID="Cite5" runat="server"></asp:Label></cite>
            </div>
            <a href="#">Ga verder</a>
          </li>
          <li id="tab6">
                <div class="images">
                <asp:ImageButton ID="ImageButton6" runat="server" width="680" height="300" />
            </div>
            <div class="info">
                  <blockquote>
                    <p><span>&lsquo;&lsquo;</span><asp:Literal ID="BlockQuote6" runat="server"></asp:Literal>&rsquo;&rsquo;</p>
              </blockquote>
              <cite><asp:Label ID="Cite6" runat="server"></asp:Label></cite>
            </div>
            <a href="#">Ga verder</a>
          </li>

        </ol>
      </div>
0
Comment
Question by:LuisEstebanValencia
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:level9wizard
ID: 35095536
Could you just have this open in a lightbox (i.e. Fancybox) ? Check out: http://fancybox.net/
0
 

Author Comment

by:LuisEstebanValencia
ID: 35096816
thats actually a good, idea, how can I implement the fancybox using my code?
0
 
LVL 11

Accepted Solution

by:
level9wizard earned 500 total points
ID: 35098287
>>[LuisEstebanValencia] thats actually a good, idea, how can I implement the fancybox using my code?

Rather than retype their guide, I suggest simply following http://fancybox.net/howto

If this is your first time working on something like this, you may even want to start experimenting in a blank HTML document (i.e. http://www.webmonkey.com/2010/02/blank_html_document/) so not to confuse potential issues with your existing code. Once you have a working sandbox, you can move what you've learned into your above code.
0
 

Author Comment

by:LuisEstebanValencia
ID: 35109173
I am trying this, but have had no succes, please help me here
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_26880338.html
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bootstrap wrap text 1 30
Make page layout not change with page 1 22
Accordion won't close correctly 5 12
Jquery driving me nuts... 14 27
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question