I'm running a very simple cycle with some you tube video's the cycle is just :
<script type="text/javascript&quo开发者_如何学Ct;>
$(document).ready(function () {
$('#cycle').cycle({
fx: 'fade',
speed: 1000,
pause: 1
});
});
</script>
I want the user action of clicking the video to call:
$('#slideshow').cycle('stop');
Or some alternative method of allowing them to watch the video, I do not want to use manual navigators, (i.e. 1, 2, 3, 4, 5 buttons). How would I go about setting up that event? I'm trying to learn JavaScript, I generally do more client side. Or alternatively if this can't be done to link to new page with the video?
Have you tried this?
$('#slideshow').click(function(){ $(this).cycle('stop'); });
You will have to NOT use the iframe code to embed your youtube videos because the iframe will prevent the click from propagating up into the main document.
精彩评论