开发者

Videos in JQuery Cycle Plugin call stop event

开发者 https://www.devze.com 2023-02-17 06:09 出处:网络
I\'m running a very simple cycle with some you tube video\'s the cycle is just : <script type="text/javascript&quo开发者_如何学Ct;>

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号