HTMLGuyLLC / jAlert

jQuery alert/modal/lightbox plugin
https://htmlguyllc.github.io/jAlert/
MIT License
76 stars 35 forks source link

How to use direct link Youtube ? #26

Closed loorlab closed 8 years ago

loorlab commented 8 years ago

Hi , for our function we have the following code :

$('.lb-video').alertOnClick({ 'video': 'https://www.youtube.com/embed/aVO2SKs9BK8', 'size': 'lg' });

But want to use the direct link ( https://www.youtube.com/watch?v=aVO2SKs9BK8 ) without embed, is that possible?

Thanks !

HTMLGuyLLC commented 8 years ago

Do you mean you want it to lead to the video on youtube on click of '.lb-video' or you want it to popup and show a link?

HTMLGuyLLC commented 8 years ago

To have '.lb-video' link to that video, you don't need jAlert. You just do an onclick handler with a window.location.href = 'VIDEO_URL';

HTMLGuyLLC commented 8 years ago

To have the link to youtube in a jalert, just use the content parameter

loorlab commented 8 years ago

It is that when we run the following code but the video does not load :

$('.lb-video').alertOnClick({ 'video': 'https://www.youtube.com/watch?v=aVO2SKs9BK8', 'size': 'lg' });

https://www.youtube.com/embed/aVO2SKs9BK8 vs https://www.youtube.com/watch?v=aVO2SKs9BK8

We do not need the direct link as a href, is the code that we show in this question jAlert .

HTMLGuyLLC commented 8 years ago

Oh Sorry, I see what you mean. The URL without /embed/, not the url to the video without embedding it. No, I do not believe that is possible.

loorlab commented 8 years ago

Please keep it as a suggestion for a future release, Thanks !