jQuery Video Target Question
- Started
- Last post
- 4 Responses
- ETM0
Quick jquery / YouTube frame API question. If I have:
Need a video to pause if the tab/div it's in is hidden. I have the following to close the tabs and open the one the user selects:
$(function() {
$('#showdiv1').click(function() {
$('div[id^=video]').hide();
$('#video1').show();
});How/where would I chain in when the tab is hidden:
player.pauseVideo();
Anything I've tried fails.
- mikotondria30
try the .get function, which is ajax..
Have a script or page somewhere that is just the embed code for the vimeo video, then pass that to the $.get function, more at:
http://api.jquery.com/jQuery.get…
Should be able to work it out from there :)
- ArmandoEstrada0
Thanks. Would I have 1 page per video or 1 page with all the embed codes in it?
- mikotondria30
could point it at a script and pass a variable...
like:
$.get("myvideos.php", { videoTitle: "MyLittlePony" } );Then just do a switch in your php on $videoTitle, ect :)