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');
- var isPlaying = playing();
- if (jQuery(this).hasClass('true')) {
- jQuery(this).find('.question-video-wrap').show();
- jQuery(this).find('.question-video').get(0).play();
- if (isPlaying = true) {
- jQuery(this).find('.question-video').on('ended',function(){
- var activeIndex = jQuery(this).closest('.active-slide').index();
- jQuery(jQuery('.case-slide').get(activeIndex)).removeClass('active-slide');
- jQuery(jQuery('.case-slide').get(activeIndex + 1)).addClass('active-slide');
- if (activeIndex == jQuery('.case-slide li').length - 1) {
- location.reload();
- }
- });
- }
- } else if (jQuery(this).hasClass('false')) {
- console.log('false');
- jQuery(this).find('.question-video-wrap').show();
- jQuery(this).find('.question-video').get(0).play();
- 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