Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).on('click', '.question-list li', function() {
- jQuery('.curbside-consult').addClass('unclickable');
- // console.log(jQuery(this));
- if (jQuery(this).hasClass('true')) {
- jQuery(this).find('.question-video-wrap').show();
- var videoPlay = jQuery(this).find('.question-video');
- videoPlay.get(0).play();
- // jQuery(this).find('.question-video').trigger('playing');
- console.log(isPlaying);
- if (!isPlaying) {
- jQuery(this).find('.question-video').on('ended',function(){
- // jQuery(this).find('.question-video').trigger('ended');
- console.log('video has ended');
- var activeIndex = jQuery(this).closest('.active-slide').index();
- console.log(activeIndex);
- jQuery(jQuery('.case-slide').get(activeIndex)).removeClass('active-slide');
- if (activeIndex == jQuery('.case-slide').length - 1) {
- console.log('The concluding video should be showing');
- jQuery('.concluding-case-wrap').show();
- jQuery('.concluding-case-video').play();
- } else {
- jQuery(jQuery('.case-slide').get(activeIndex + 1)).addClass('active-slide');
- }
- });
- }
- } else if (jQuery(this).hasClass('false')) {
- // jQuery(this).find('.question-video').trigger('ended');
- console.log('false');
- jQuery(this).find('.question-video-wrap').show();
- jQuery(this).find('.question-video').get(0).play();
- //jQuery(this).find('.question-video').trigger('playing');
- jQuery(this).find('.question-video').on('ended',function(){
- jQuery(this).closest('.question-video-wrap').hide();
- });
- } else {
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement