Solved

PLay youtube video on top of an image when its clicked

Posted on 2011-03-10
4
248 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now