Okay
  Public Ticket #544589
Image opens youtube video in lightbox
Closed

Comments

  •  4
    Casey started the conversation

    Hello

    I've been trying to figure out how to trigger a youtube video in a lightbox from an image.. Is that something that possible?

    Thanks!

    -c

  •  9,638
    Tahir replied

    Hey ,

    See url : https://themenectar.ticksy.com/article/2238/ . You can change the button code to img tag.

    Thanks


     Salient Support Team


  •  4
    Casey replied

    Wow, seems so simple but I\'m still having trouble. Sorry to be annoying, but can you show me what that would look like with img tag?

  •  9,638
    Tahir replied

    Sure,

    <a href=\"https://www.youtube.com/watch?v=yarB1NCyqfs\" rel=\"prettyPhoto\"><img class=\"alignnone size-medium wp-image-2428\" src=\"http://localhost/salient/wp-content/uploads/2014/04/about-me23-e1433856887755-289x300.jpg\" alt=\"about-me2\" width=\"289\" height=\"300\" /></a>

    Thanks


     Salient Support Team


  •  1
    Aarik replied

    Could you please tell me how to do this using the Magnific lightbox style? Here is the code I'm using, but it's not working.

    <div id="bio-btn"><a href="#" class="gallery magnific"><img src="button.jpg"></a></div>

    Thanks!


  •  9,638
    Tahir replied

    Hey Aarik,

    The Correct class is 'magnific-popup' so your code would like below :

    <div id="bio-btn"><a href="#" class="gallery magnific-popup"><img src="button.jpg"></a></div>

    Thanks 


     Salient Support Team


  •  1
    Aarik replied

    That is taking me to the YouTube page, not opening in Lightbox. It's the second "Director's Bio" button on this link...

    http://storyco.tv/2016/rubin/

    Thanks,

    Aarik

  •  1
    Aarik replied

    It's the "Play Reel" button I need to play a lightbox video. Thanks!

  •  9,638
    Tahir replied

    @Aarik,

    Please create a new ticket with your wp-admin login details so we can take a look.

    Thanks 


     Salient Support Team