| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- $(document).ready(function(){
- new WOW().init();
-
- $('.top-left-image').css('opacity','1');
- $(".home-step-wave").click(function(event) {
- var position = $(this).offset().top;
- $('html').animate({
- scrollTop: position
- });
- });
- setInterval(function(){
- nextStudent();
- }, 4000);
- })
-
- var tag = document.createElement('script');
- tag.src = "https://www.youtube.com/iframe_api";
- var firstScriptTag = document.getElementsByTagName('script')[0];
- firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
- var player;
- function onYouTubeIframeAPIReady() {
- player = new YT.Player('video-player', {
- videoId: 'Ixkd3pLIlY4',
- height: '100%',
- width: '100%',
- playerVars: {
- autoplay: 0,
- controls: 0,
- showinfo: 0,
- playsinline: 1,
- rel: 0
- },
- events: {
- // 'onReady': onPlayerReady,
- // 'onStateChange': onPlayerStateChange
- }
- });
- $(document).on('click', '.home-method .method-video .video-layout', function(){
- if(player.getPlayerState() == 1){
- player.pauseVideo();
- $(".home-method .method-video .video-layout").removeClass('hide-layout');
- }else{
- player.playVideo();
- $(".home-method .method-video .video-layout").addClass('hide-layout');
- }
-
- });
- }
- var checkClick = 1;
- var timeEffectNext = 500;
- function nextStudent(){
- if ( checkClick == 1 ){
- checkClick = 0;
- var divCur = $('.home-student-info.info-active');
- var divNext = $(divCur).next('.home-student-info');
- if ( divNext.length == 0 ){
- divNext = $('.home-student-info:first-child');
- }
- if ( !$(divNext).is(divCur) ){
- // Effect
- $(divCur).animate({
- left: "-100%",
- },{
- duration: timeEffectNext,
- complete: function() {
- $(divCur).css("display", "none");
- }
- });
- $(divNext).css({
- display: "block",
- left: "100%",
- });
- $(divNext).animate({
- left: "0%",
- },{
- duration: timeEffectNext,
- complete: function() {
- // Effect next complete
- checkClick = 1;
- divCur.removeClass('info-active');
- divNext.addClass('info-active');
- }
- });
- // End Effect
- }
-
- }
-
- }
|