Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.16 KB | None | 0 0
  1. jQuery(document).on('click', '.question-list li', function() {
  2.  
  3.   jQuery('.curbside-consult').addClass('unclickable');
  4.  
  5.   var isPlaying = playing();
  6.  
  7.   if (jQuery(this).hasClass('true')) {
  8.  
  9.       jQuery(this).find('.question-video-wrap').show();
  10.       jQuery(this).find('.question-video').get(0).play();
  11.  
  12.       if (isPlaying = true) {
  13.           jQuery(this).find('.question-video').on('ended',function(){
  14.               var activeIndex = jQuery(this).closest('.active-slide').index();
  15.               jQuery(jQuery('.case-slide').get(activeIndex)).removeClass('active-slide');
  16.               jQuery(jQuery('.case-slide').get(activeIndex + 1)).addClass('active-slide');
  17.               if (activeIndex == jQuery('.case-slide li').length - 1) {
  18.                  location.reload();
  19.               }
  20.           });
  21.       }
  22.   } else if (jQuery(this).hasClass('false')) {
  23.       console.log('false');
  24.       jQuery(this).find('.question-video-wrap').show();
  25.       jQuery(this).find('.question-video').get(0).play();
  26.       jQuery(this).find('.question-video').on('ended',function(){
  27.           jQuery(this).closest('.question-video-wrap').hide();
  28.       });
  29.   } else {
  30.  
  31.   }
  32. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement