Video-JS Prevent click event from propagationinig to child elements
I created a simple video page with Video-JS plugin. videos plays in a
popup module. What i'm trying to do is to close this popup whenever the
video wrapper is clicked, not the video. But i fail to do so and even when
i click on video controls the popup closes. My code looks like this:
$('.popup-video').click(function() {
$(this).fadeOut(500);
// Pause Video
});
$('.popup-video>div').click(function(e) {
e.stopPropagation();
});
$('.popup-video>video').click(function(e) {
e.stopPropagation();
});
.stopPropagation method used to do the trick, but not now! what am i doing
wrong?
No comments:
Post a Comment