How to use Story5 method in storybook-root

Best JavaScript code snippet using storybook-root

daima.js

Source:daima.js Github

copy

Full Screen

123document.onreadystatechange = function () {//即在加载的过程中执行下面的代码4 if(document.readyState=="uninitialized"){5 $('.loading').show();6 }78 if(document.readyState=="loading"){9 $('.loading').show();10 }1112 if(document.readyState=="complete"){//complete加载完成13 $('.loading').hide()14 $('.first').show()15 $(".main").hide()16 $(".change").hide()17 $(".music").hide()18 $(".map").hide()19 $(".book").hide()20 $("#book-pre").hide()21 $(".jin-1").hide()22 $(".mu-1").hide()23 $(".shui-1").hide()24 $(".huo-1").hide()25 $(".tu-1").hide()26 $(".jinback").hide()27 $(".muback").hide()28 $(".shuiback").hide()29 $(".huoback").hide()30 $(".tuback").hide()31 $("#story1").hide()32 $("#judge1").hide()33 $("#judge2").hide()34 $("#judge3").hide()35 $("#judge4").hide()36 $("#judge5").hide()37 $("#judge6").hide()38 $("#judge7").hide()39 $("#judge8").hide()40 $("#story1-1-next").hide();41 $("#story1-1").hide();42 $("#story1-2-next").hide();43 $("#story1-2").hide();44 $("#story1-3-next").hide();45 $("#story1-3").hide();46 $("#story1-4-next").hide();47 $("#story1-4").hide();48 $("#story1-5-next").hide();49 $("#story1-5").hide();50 $("#story1-6-next").hide();51 $("#story1-6").hide();52 $("#story1-7-next").hide();53 $("#story1-7").hide();54 $("#story1-8-next").hide();55 $("#story1-8").hide();56 $("#story1-9-next").hide();57 $("#story1-9").hide();58 $("#story1-10-next").hide();59 $("#story1-10").hide();60 $("#story1-11-next").hide();61 $("#story1-11").hide();62 $("#story1-12-next").hide();63 $("#story1-12").hide();64 $("#story1-13-next").hide();65 $("#story1-13").hide();66 $("#story1-14-next").hide();67 $("#story1-14").hide();68 $("#story1-15-next").hide();69 $("#story1-15").hide();70 $("#story1-16-next").hide();71 $("#story1-16").hide();72 $("#story1-17-next").hide();73 $("#story1-17").hide();74 $("#story5").hide();75 $("#story5-1-next").hide();76 $("#story5-1").hide();77 $("#story5-2-next").hide();78 $("#story5-2").hide();79 $("#story5-3-next").hide();80 $("#story5-3").hide();81 $("#story5-4-next").hide();82 $("#story5-4").hide();83 $("#story5-5-next").hide();84 $("#story5-5").hide();85 $("#story5-6-next").hide();86 $("#story5-6").hide();87 $("#story5-7-next").hide();88 $("#story5-7").hide();89 $("#story5-8-next").hide();90 $("#story5-8").hide();91 $("#story5-9-next").hide();92 $("#story5-9").hide();93 $("#story5-10-next").hide();94 $("#story5-10").hide();95 $("#story5-11-next").hide();96 $("#story5-11").hide();97 $("#story5-12-next").hide();98 $("#story5-12").hide();99 $("#story5-13-next").hide();100 $("#story5-13").hide();101 $("#story5-14-next").hide();102 $("#story5-14").hide();103 $("#story5-15-next").hide();104 $("#story5-15").hide();105 $("#story5-16-next").hide();106 $("#story5-16").hide();107 $("#story5-17-next").hide();108 $("#story5-17").hide();109 $("#story5-18-next").hide();110 $("#story5-18").hide();111 $("#story5-19-next").hide();112 $("#story5-19").hide();113 $("#story5-20-next").hide();114 $("#story5-20").hide();115 }116 }117118/*119let app = new PIXI.Application({ 120 width: 1051.65, // default: 800121 height: 701.1, // default: 600122 antialias: true, // default: false123 transparent: false, // default: false124 resolution: 1 // default: 1125 126 }127);128app.renderer.backgroundColor = 0x061639129document.body.appendChild(app.view);130*/131132var a,b,c;133a = 0;134b = 0;135c = 0;136 var clickthen = new Howl({137 src: ['./clickthen.mp3'],138 autoplay: false,139loop: false,140volume: 0.5,141142 });143144145 var clickitem = new Howl({146 src: ['./clickitem.mp3'],147 autoplay: false,148loop: false,149volume: 0.5,150151 });152153154 var dong = new Howl({155 src: ['./dong.mp3'],156 autoplay: false,157loop: false,158volume: 0.5,159160 });161162 $("#a1,#a2,#a3,#a4,#a5,#a6,#a7,#a8").mouseover(function(){163 dong.play();164},);165166/////////////////////////////////167168169170function go1(){171 clickitem.play();172 clickthen.play();173 $('.music').show()174 $("#tag-qingbaozhan").hide()175 $("#shouji").hide()176 $('.change').show()177 setTimeout(function(){$(".first").hide(); $('.main').show()},500);178 TweenMax.to('.leftchange', 0.5, {179 left:0, 180 repeat:1, 181 repeatDelay: 0.2,182 yoyo:true, 183 onComplete:function(){184 $(".change").hide();185 }186});187TweenMax.to('.rightchange', 0.5, {188 right:0, 189 repeat:1, 190 repeatDelay: 0.2,191 yoyo:true, 192});193194195}196197/////////////////////////////////198199function back1(){200 clickitem.play();201 clickthen.play();202 $('.change').show()203 setTimeout(function(){$(".main").hide(),204 $('.first').show()},500);205 TweenMax.to('.leftchange', 0.5, {206 left:0, 207 repeat:1, 208 repeatDelay: 0.2,209 yoyo:true, 210 onComplete:function(){211 $(".change").hide();212 }213});214TweenMax.to('.rightchange', 0.5, {215 right:0, 216 repeat:1, 217 repeatDelay: 0.2,218 yoyo:true, 219});220221}222223/////////////////////////////////224225var bgm = new Howl({226src: [227'bg1.mp3'228],229autoplay: true,230loop: true,231volume: 0.2,232});233234/////////////////////////////////235236function jingyin(){237bgm.volume(0)238$(".musicon").hide()239$(".musicoff").show()240}241242function kaishengyin(){243bgm.volume(0.2)244$(".musicon").show()245$(".musicoff").hide()246}247248/////////////////////////////////249250function tag1on() {251 $("#tag-qingbaozhan").show()252 $(".chazi1").show()253}254255function tag1off() {256 $("#tag-qingbaozhan").hide()257 $(".chazi1").hide()258}259260/////////////////////////////////261262function taniphonix(){263 $("#shouji").show()264}265266function guaniphonix1(){267 $("#shouji").hide()268 $(".iphonix-in2").animate({height:'701.1px'});269 $(".center-xy").css("display","");270 $(".fenghuang").fadeIn(200)271 272273}274////////////////////////////////////////////////////////////////////////////////275var inputRange = document.getElementsByClassName('pullee')[0],276 minValue = 0,277 maxValue = 50,278 currValue, rafID;279280// set min/max value281inputRange.min = minValue;282inputRange.max = maxValue;283284// listen for unlock285inputRange.addEventListener('mouseup', function() {286287 currValue = +this.value;288289 if (currValue >= maxValue) {290 successHandler();291 rafID = window.requestAnimationFrame(animateHandler);292 } else {293 rafID = window.requestAnimationFrame(animateHandler);294 }295}, false);296297// clear raf if trying again298inputRange.addEventListener('mousedown', function() {299 window.cancelAnimationFrame(rafID);300 currValue = +this.value;301}, false);302303// handle range animation304function animateHandler() {305306 // update input range307 inputRange.value = currValue;308309 // decrement value310 currValue--;311312 // determine if we need to continue313 if (currValue > -1) {314 window.requestAnimationFrame(animateHandler);315 }316}317318// handle successful unlock319function successHandler(){320 $(".iphonix-in2").animate({height:'0px'},"");321 $(".center-xy").css("display","none");322 $(".fenghuang").fadeOut(200)323}324325/////////////////////////////////326327function tanxunfangtu(){328 $("#huode").hide();329 $("#wancheng").hide();330 clickitem.play();331 clickthen.play();332 $(".music").hide()333 $('.change').show()334 setTimeout(function(){ $('.main').hide()335 $('.map').show()},500);336 TweenMax.to('.leftchange', 0.5, {337 left:0, 338 repeat:1, 339 repeatDelay: 0.2,340 yoyo:true, 341 onComplete:function(){342 $(".change").hide();343 }344});345 TweenMax.to('.rightchange', 0.5, {346 right:0, 347 repeat:1, 348 repeatDelay: 0.2,349 yoyo:true, 350 });351 352}353354/////////////////////////////////355356var drawn = new Howl({357 src: [358 'drawn.wav'359 ],360 autoplay: false,361 loop: false,362 volume: 0.5,363 });364 365 /////////////////////////////////366367function a1(){368 a = a + 3;369 document.getElementById("renwushu").innerHTML = a;370 clickitem.play();371 drawn.play();372373 $(".icon-word").animate({height:"0",opacity:"0"},1);374 $(".icon-word").hide();375 376 setTimeout(function(){ $("#a1w").show()},);377 setTimeout(function(){$("#a1w").animate({height:"312px",opacity:"1.0"})},);378379 $(".choice-main").animate({height:"0",opacity:"0"},1);380 $(".choice-main").hide();381382 setTimeout(function(){$("#choice-main1").show()},);383 setTimeout(function(){$("#choice-main1").animate({height:"300px",opacity:"1.0"},200)},);384}385386function a2(){387 clickitem.play();388 drawn.play();389390 $(".icon-word").animate({height:"0",opacity:"0"},1);391 $(".icon-word").hide();392 393 setTimeout(function(){$("#a2w").show()},);394 setTimeout(function(){$("#a2w").animate({height:"312px",opacity:"1.0"})},);395396 $(".choice-main").animate({height:"0",opacity:"0"},1);397 $(".choice-main").hide();398399 setTimeout(function(){$("#choice-main2").show()},);400 setTimeout(function(){$("#choice-main2").animate({height:"300px",opacity:"1.0"},200)},);401}402403function a3(){404 clickitem.play();405 drawn.play();406407 $(".icon-word").animate({height:"0",opacity:"0"},1);408 $(".icon-word").hide();409 setTimeout(function(){$("#a3w").show()},);410 setTimeout(function(){$("#a3w").animate({height:"312px",opacity:"1.0"})},);411412 $(".choice-main").animate({height:"0",opacity:"0"},1);413 $(".choice-main").hide();414415 setTimeout(function(){$("#choice-main3").show()},);416 setTimeout(function(){$("#choice-main3").animate({height:"300px",opacity:"1.0"},200)},);417}418419function a4(){420 clickitem.play();421 drawn.play();422423 $(".icon-word").animate({height:"0",opacity:"0"},1);424 $(".icon-word").hide();425 426 setTimeout(function(){$("#a4w").show()},);427 setTimeout(function(){$("#a4w").animate({height:"312px",opacity:"1.0"})},);428429 $(".choice-main").animate({height:"0",opacity:"0"},1);430 $(".choice-main").hide();431432 setTimeout(function(){$("#choice-main4").show()},);433 setTimeout(function(){$("#choice-main4").animate({height:"300px",opacity:"1.0"},200)},);434}435436function a5(){437 clickitem.play();438 drawn.play();439440 $(".icon-word").animate({height:"0",opacity:"0"},1);441 $(".icon-word").hide();442 443 setTimeout(function(){$("#a5w").show()},);444 setTimeout(function(){$("#a5w").animate({height:"312px",opacity:"1.0"})},);445446 $(".choice-main").animate({height:"0",opacity:"0"},1);447 $(".choice-main").hide();448449 setTimeout(function(){$("#choice-main5").show()},);450 setTimeout(function(){$("#choice-main5").animate({height:"300px",opacity:"1.0"},200)},);451}452453function a6(){454 clickitem.play();455 drawn.play();456457 $(".icon-word").animate({height:"0",opacity:"0"},1);458 $(".icon-word").hide();459 460 setTimeout(function(){$("#a6w").show()},);461 setTimeout(function(){$("#a6w").animate({height:"312px",opacity:"1.0"})},);462463 $(".choice-main").animate({height:"0",opacity:"0"},1);464 $(".choice-main").hide();465466 setTimeout(function(){$("#choice-main6").show()},);467 setTimeout(function(){$("#choice-main6").animate({height:"300px",opacity:"1.0"},200)},);468}469470function a7(){471 clickitem.play();472 drawn.play();473474 $(".icon-word").animate({height:"0",opacity:"0"},1);475 $(".icon-word").hide();476477 setTimeout(function(){$("#a7w").show()},);478 setTimeout(function(){$("#a7w").animate({height:"312px",opacity:"1.0"},200)},);479480 $(".choice-main").animate({height:"0",opacity:"0"},1);481 $(".choice-main").hide();482483 setTimeout(function(){$("#choice-main7").show()},);484 setTimeout(function(){$("#choice-main7").animate({height:"300px",opacity:"1.0"},200)},);485}486487function a8(){488 clickitem.play();489 drawn.play();490491 $(".icon-word").animate({height:"0",opacity:"0"},1);492 $(".icon-word").hide();493494 setTimeout(function(){$("#a8w").show()},);495 setTimeout(function(){$("#a8w").animate({height:"312px",opacity:"1.0"},200)},);496497 $(".choice-main").animate({height:"0",opacity:"0"},1);498 $(".choice-main").hide();499500 setTimeout(function(){$("#choice-main8").show()},);501 setTimeout(function(){$("#choice-main8").animate({height:"300px",opacity:"1.0"},200)},);502}503504/////////////////////////////////505506function a1start(){507 $("#judge1").show()508}509function a2start(){510 $("#judge2").show()511}512function a3start(){513 $("#judge3").show()514}515function a4start(){516 $("#judge4").show()517}518function a5start(){519 $("#judge5").show()520}521function a6start(){522 $("#judge6").show()523}524function a7start(){525 $("#judge7").show()526}527function a8start(){528 $("#judge8").show()529}530531/////////////////////////////////532533function closejudge1(){534 $("#judge1").hide()535}536function closejudge2(){537 $("#judge2").hide()538}539function closejudge3(){540 $("#judge3").hide()541}542function closejudge4(){543 $("#judge4").hide()544}545function closejudge5(){546 $("#judge5").hide()547}548function closejudge6(){549 $("#judge6").hide()550}551function closejudge7(){552 $("#judge7").hide()553}554function closejudge8(){555 $("#judge8").hide()556}557558559/////////////////////////////////560561function story1go(){562 $("#judge1").hide()563 $(".map").animate({opacity:"0"},1000);564 setTimeout(function(){$(".map").hide()},1000);565 setTimeout(function(){$("#story1").show(),$("#story1-1-next").show(), $("#story1-1").show()},200);566 setTimeout(function(){$("#story1").animate({opacity:1},1000)},1000);567}568569function story5go(){570 $("#judge5").hide()571 $(".map").animate({opacity:"0"},1000);572 setTimeout(function(){$(".map").hide()},1000);573 setTimeout(function(){$("#story5").show(),$("#story5-5-next").show(), $("#story5-5").show()},200);574 setTimeout(function(){$("#story5").animate({opacity:1},1000)},1000);575}576577/////////////////////////////////////578579 function story1next1(){ $("#story1-1-next").hide();$("#story1-1").hide()580 $("#story1-2-next").show(); $("#story1-3").show()581 }function story1next2(){ $("#story1-2-next").hide();$("#story1-2").hide()582 $("#story1-3-next").show(); $("#story1-4").show()583 }function story1next3(){ $("#story1-3-next").hide();$("#story1-3").hide()584 $("#story1-4-next").show(); $("#story1-5").show()585 }function story1next4(){ $("#story1-4-next").hide();$("#story1-4").hide()586 $("#story1-5-next").show(); $("#story1-6").show()587 }function story1next5(){ $("#story1-5-next").hide();$("#story1-5").hide()588 $("#story1-6-next").show(); $("#story1-7").show()589 }function story1next6(){ $("#story1-6-next").hide();$("#story1-6").hide()590 $("#story1-7-next").show(); $("#story1-8").show()591 }function story1next7(){ $("#story1-7-next").hide();$("#story1-7").hide()592 $("#story1-8-next").show(); $("#story1-9").show()593 }function story1next8(){ $("#story1-8-next").hide();$("#story1-8").hide()594 $("#story1-9-next").show(); $("#story1-10").show()595 }function story1next9(){ $("#story1-9-next").hide();$("#story1-9").hide()596 $("#story1-10-next").show(); $("#story1-11").show()597 }function story1next10(){ $("#story1-10-next").hide();$("#story1-10").hide()598 $("#story1-11-next").show(); $("#story1-12").show()599 }function story1next11(){ $("#story1-11-next").hide();$("#story1-11").hide()600 $("#story1-12-next").show(); $("#story1-13").show()601 }function story1next12(){ $("#story1-12-next").hide();$("#story1-12").hide()602 $("#story1-13-next").show(); $("#story1-14").show()603 }function story1next13(){ $("#story1-13-next").hide();$("#story1-13").hide()604 $("#story1-14-next").show(); $("#story1-15").show()605 }function story1next14(){ $("#story1-14-next").hide();$("#story1-14").hide()606 $("#story1-15-next").show(); $("#story1-16").show()607 }function story1next15(){ $("#story1-15-next").hide();$("#story1-15").hide()608 $("#story1-16-next").show(); $("#story1-17").show()609 }function story1next16(){ $("#story1-16-next").hide();$("#story1-16").hide()610 $("#story1-17-next").show(); $("#story1-").show()611 }function story1next17(){ $("#story1-17-next").hide();$("#story1-17").hide()612 $("#story1--next").show(); $("#story1-").show()613 }614615 function story5next1(){ $("#story5-1-next").hide();$("#story5-1").hide()616 $("#story5-2-next").show(); $("#story5-2").show()617 }function story5next2(){ $("#story5-2-next").hide();$("#story5-2").hide()618 $("#story5-3-next").show(); $("#story5-3").show()619 }function story5next3(){ $("#story5-3-next").hide();$("#story5-3").hide()620 $("#story5-4-next").show(); $("#story5-4").show()621 }function story5next4(){ $("#story5-4-next").hide();$("#story5-4").hide()622 $("#story5-5-next").show(); $("#story5-5").show()623 }function story5next5(){ $("#story5-5-next").hide();$("#story5-5").hide()624 $("#story5-6-next").show(); $("#story5-6").show()625 }function story5next6(){ $("#story5-6-next").hide();$("#story5-6").hide()626 $("#story5-7-next").show(); $("#story5-7").show()627 }function story5next7(){ $("#story5-7-next").hide();$("#story5-7").hide()628 $("#story5-8-next").show(); $("#story5-8").show()629 }function story5next8(){ $("#story5-8-next").hide();$("#story5-8").hide()630 $("#story5-9-next").show(); $("#story5-9").show()631 }function story5next9(){ $("#story5-9-next").hide();$("#story5-9").hide()632 $("#story5-10-next").show(); $("#story5-10").show()633 }function story5next10(){ $("#story5-10-next").hide();$("#story5-10").hide()634 $("#story5-11-next").show(); $("#story5-11").show()635 }function story5next11(){ $("#story5-11-next").hide();$("#story5-11").hide()636 $("#story5-12-next").show(); $("#story5-12").show()637 }function story5next12(){ $("#story5-12-next").hide();$("#story5-12").hide()638 $("#story5-13-next").show(); $("#story5-13").show()639 }function story5next13(){ $("#story5-13-next").hide();$("#story5-13").hide()640 $("#story5-14-next").show(); $("#story5-14").show()641 }function story5next14(){ $("#story5-14-next").hide();$("#story5-14").hide()642 $("#story5-15-next").show(); $("#story5-15").show()643 }function story5next15(){ $("#story5-15-next").hide();$("#story5-15").hide()644 $("#story5-16-next").show(); $("#story5-16").show()645 }function story5next16(){ $("#story5-16-next").hide();$("#story5-16").hide()646 $("#story5-17-next").show(); $("#story5-17").show()647 }function story5next17(){ $("#story5-17-next").hide();$("#story5-17").hide()648 $("#story5--next").show(); $("#story5-").show()649 }650 651 function songzhong(){652 $("#story5-5").hide()653 $("#story5-7").hide()654 $("#story5-8").hide()655 $("#story5-9").hide()656 $("#story5-10").hide()657 $("#story5-11").hide()658 $("#story5-12").hide()659 $("#story5-13").hide()660 $("#story5-14").hide()661 $("#story5-6").show()662 }663664 function baosang(){665 $("#story5-5").hide()666 $("#story5-6").hide()667 $("#story5-8").hide()668 $("#story5-9").hide()669 $("#story5-10").hide()670 $("#story5-11").hide()671 $("#story5-12").hide()672 $("#story5-13").hide()673 $("#story5-14").hide()674 $("#story5-7").show()675 }676677 function zhaohun(){678 $("#story5-5").hide()679 $("#story5-6").hide()680 $("#story5-8").show()681 $("#story5-9").hide()682 $("#story5-10").hide()683 $("#story5-11").hide()684 $("#story5-12").hide()685 $("#story5-13").hide()686 $("#story5-14").hide()687 $("#story5-7").hide()688 }689690 function diaoyan(){691 $("#story5-5").hide()692 $("#story5-6").hide()693 $("#story5-8").hide()694 $("#story5-9").show()695 $("#story5-10").hide()696 $("#story5-11").hide()697 $("#story5-12").hide()698 $("#story5-13").hide()699 $("#story5-14").hide()700 $("#story5-7").hide()701 }702703 function rulian(){704 $("#story5-5").hide()705 $("#story5-6").hide()706 $("#story5-8").hide()707 $("#story5-9").hide()708 $("#story5-10").show()709 $("#story5-11").hide()710 $("#story5-12").hide()711 $("#story5-13").hide()712 $("#story5-14").hide()713 $("#story5-7").hide()714 }715716 function qiling(){717 $("#story5-5").hide()718 $("#story5-6").hide()719 $("#story5-8").hide()720 $("#story5-9").hide()721 $("#story5-10").hide()722 $("#story5-11").show()723 $("#story5-12").hide()724 $("#story5-13").hide()725 $("#story5-14").hide()726 $("#story5-7").hide()727 }728 729 function songsang(){730 $("#story5-5").hide()731 $("#story5-6").hide()732 $("#story5-8").hide()733 $("#story5-9").hide()734 $("#story5-10").hide()735 $("#story5-11").hide()736 $("#story5-12").show()737 $("#story5-13").hide()738 $("#story5-14").hide()739 $("#story5-7").hide()740 }741742 function xiazang(){743 $("#story5-5").hide()744 $("#story5-6").hide()745 $("#story5-8").hide()746 $("#story5-9").hide()747 $("#story5-10").hide()748 $("#story5-11").hide()749 $("#story5-12").hide()750 $("#story5-13").show()751 $("#story5-14").hide()752 $("#story5-7").hide()753 }754755 function zuoqi(){756 $("#story5-5").hide()757 $("#story5-6").hide()758 $("#story5-8").hide()759 $("#story5-9").hide()760 $("#story5-10").hide()761 $("#story5-11").hide()762 $("#story5-12").hide()763 $("#story5-13").hide()764 $("#story5-14").show()765 $("#story5-7").hide()766 }767 768 769///////////////////////////////////770771function tanjiuwenlu(){772 clickitem.play(); 773 clickthen.play();774 $('.change').show()775 setTimeout(function(){ $('.main').hide()776 $('.book').show()},500);777 TweenMax.to('.leftchange', 0.5, {778 left:0, 779 repeat:1, 780 repeatDelay: 0.2,781 yoyo:true, 782 onComplete:function(){783 $(".change").hide();784 }785});786787TweenMax.to('.rightchange', 0.5, {788 right:0, 789 repeat:1, 790 repeatDelay: 0.2,791 yoyo:true, 792});793 794}795796/////////////////////////////////797798function tanback2(){799 $(".music").show()800 clickitem.play();801 clickthen.play();802 $('.change').show()803 setTimeout(function(){ $('.main').show()804 $('.map').hide()},500);805 TweenMax.to('.leftchange', 0.5, {806 left:0, 807 repeat:1, 808 repeatDelay: 0.2,809 yoyo:true, 810 onComplete:function(){811 $(".change").hide();812 }813});814TweenMax.to('.rightchange', 0.5, {815 right:0, 816 repeat:1, 817 repeatDelay: 0.2,818 yoyo:true, 819});820 $(".book").hide()821 $(".shouji").hide()822 $(".tag-qingbaozhan").hide()823 $(".iphonix-in2").animate({height:'701.1px'});824 $(".center-xy").css("display","");825}826827/////////////////////////////////828829function tanback3(){830 clickitem.play();831 clickthen.play();832 $('.change').show()833 setTimeout(function(){$('.main').show()834 $('.book').hide()},500);835 TweenMax.to('.leftchange', 0.5, {836 left:0, 837 repeat:1, 838 repeatDelay: 0.2,839 yoyo:true, 840 onComplete:function(){841 $(".change").hide();842 }843});844TweenMax.to('.rightchange', 0.5, {845 right:0, 846 repeat:1, 847 repeatDelay: 0.2,848 yoyo:true, 849});850851 $(".map").hide()852 $(".shouji").hide()853 $(".tag-qingbaozhan").hide()854 $(".iphonix-in2").animate({height:'701.1px'});855 $(".center-xy").css("display","");856}857858/////////////////////////////////859860TweenLite.fromTo('#stage',1.5, {opacity:0}, {opacity:1})861862/////////////////////////////////863864function jin(){865 clickitem.play();866 clickthen.play();867 $('.change').show()868 setTimeout(function(){$("#book-pre").show(),$(".jin-1").show(),$(".book").hide(),$(".jinback").show()},500);869 TweenMax.to('.leftchange', 0.5, {870 left:0, 871 repeat:1, 872 repeatDelay: 0.2,873 yoyo:true, 874 onComplete:function(){875 $(".change").hide();876 }877});878879TweenMax.to('.rightchange', 0.5, {880 right:0, 881 repeat:1, 882 repeatDelay: 0.2,883 yoyo:true, 884});885886}887888/////////////////////////////////889890function jinback(){891 clickitem.play();892 clickthen.play();893 $('.change').show()894 setTimeout(function(){$("#book-pre").hide(),$(".jin-1").hide(),$(".book").show(),$(".jinback").hide()},500);895 TweenMax.to('.leftchange', 0.5, {896 left:0, 897 repeat:1, 898 repeatDelay: 0.2,899 yoyo:true, 900 onComplete:function(){901 $(".change").hide();902 }903});904905TweenMax.to('.rightchange', 0.5, {906 right:0, 907 repeat:1, 908 repeatDelay: 0.2,909 yoyo:true, 910});911912}913914/////////////////////////////////915916917function mu(){918 clickitem.play();919 clickthen.play();920 $('.change').show()921 setTimeout(function(){$("#book-pre").show(),$(".mu-1").show(),$(".book").hide(),$(".muback").show()},500);922 TweenMax.to('.leftchange', 0.5, {923 left:0, 924 repeat:1, 925 repeatDelay: 0.2,926 yoyo:true, 927 onComplete:function(){928 $(".change").hide();929 }930});931932TweenMax.to('.rightchange', 0.5, {933 right:0, 934 repeat:1, 935 repeatDelay: 0.2,936 yoyo:true, 937});938939}940941/////////////////////////////////942943function muback(){944 clickitem.play();945 clickthen.play();946 $('.change').show()947 setTimeout(function(){$("#book-pre").hide(),$(".mu-1").hide(),$(".book").show(),$(".muback").hide()},500);948 TweenMax.to('.leftchange', 0.5, {949 left:0, 950 repeat:1, 951 repeatDelay: 0.2,952 yoyo:true, 953 onComplete:function(){954 $(".change").hide();955 }956});957958TweenMax.to('.rightchange', 0.5, {959 right:0, 960 repeat:1, 961 repeatDelay: 0.2,962 yoyo:true, 963});964965}966967/////////////////////////////////968969function shui(){970971 clickitem.play();972 clickthen.play();973 $('.change').show()974 setTimeout(function(){$("#book-pre").show(),$(".shui-1").show(),$(".book").hide(),$(".shuiback").show()},500);975 TweenMax.to('.leftchange', 0.5, {976 left:0, 977 repeat:1, 978 repeatDelay: 0.2,979 yoyo:true, 980 onComplete:function(){981 $(".change").hide();982 }983});984985TweenMax.to('.rightchange', 0.5, {986 right:0, 987 repeat:1, 988 repeatDelay: 0.2,989 yoyo:true, 990});991992}993994/////////////////////////////////995996function shuiback(){997 clickitem.play();998 clickthen.play();999 $('.change').show()1000 setTimeout(function(){$("#book-pre").hide(),$(".shui-1").hide(),$(".book").show(),$(".shuiback").hide()},500);1001 TweenMax.to('.leftchange', 0.5, {1002 left:0, 1003 repeat:1, 1004 repeatDelay: 0.2,1005 yoyo:true, 1006 onComplete:function(){1007 $(".change").hide();1008 }1009});10101011TweenMax.to('.rightchange', 0.5, {1012 right:0, 1013 repeat:1, 1014 repeatDelay: 0.2,1015 yoyo:true, 1016});10171018}10191020/////////////////////////////////10211022function huo(){1023 clickitem.play();1024 clickthen.play();1025 $('.change').show()1026 setTimeout(function(){$("#book-pre").show(),$(".huo-1").show(),$(".book").hide(),$(".huoback").show()},500);1027 TweenMax.to('.leftchange', 0.5, {1028 left:0, 1029 repeat:1, 1030 repeatDelay: 0.2,1031 yoyo:true, 1032 onComplete:function(){1033 $(".change").hide();1034 }1035});10361037TweenMax.to('.rightchange', 0.5, {1038 right:0, 1039 repeat:1, 1040 repeatDelay: 0.2,1041 yoyo:true, 1042});10431044}10451046/////////////////////////////////10471048function huoback(){1049 clickitem.play();1050 clickthen.play();1051 $('.change').show()1052 setTimeout(function(){$("#book-pre").hide(),$(".huo-1").hide(),$(".book").show(),$(".huoback").hide()},500);1053 TweenMax.to('.leftchange', 0.5, {1054 left:0, 1055 repeat:1, 1056 repeatDelay: 0.2,1057 yoyo:true, 1058 onComplete:function(){1059 $(".change").hide();1060 }1061});10621063TweenMax.to('.rightchange', 0.5, {1064 right:0, 1065 repeat:1, 1066 repeatDelay: 0.2,1067 yoyo:true, 1068});10691070}10711072/////////////////////////////////10731074function tu(){1075 clickitem.play();1076 clickthen.play();1077 $('.change').show()1078 setTimeout(function(){$("#book-pre").show(),$(".tu-1").show(),$(".book").hide(),$(".tuback").show()},500);1079 TweenMax.to('.leftchange', 0.5, {1080 left:0, 1081 repeat:1, 1082 repeatDelay: 0.2,1083 yoyo:true, 1084 onComplete:function(){1085 $(".change").hide();1086 }1087});10881089TweenMax.to('.rightchange', 0.5, {1090 right:0, 1091 repeat:1, 1092 repeatDelay: 0.2,1093 yoyo:true, 1094});10951096}10971098/////////////////////////////////10991100function tuback(){1101 clickitem.play();1102 clickthen.play();1103 $('.change').show()1104 setTimeout(function(){$("#book-pre").hide(),$(".tu-1").hide(),$(".book").show(),$(".tuback").hide()},500);1105 TweenMax.to('.leftchange', 0.5, {1106 left:0, 1107 repeat:1, 1108 repeatDelay: 0.2,1109 yoyo:true, 1110 onComplete:function(){1111 $(".change").hide();1112 }1113});11141115TweenMax.to('.rightchange', 0.5, {1116 right:0, 1117 repeat:1, 1118 repeatDelay: 0.2,1119 yoyo:true, 1120});11211122}11231124/////////////////////////////////112511261127/////////////////////////////////11281129document.getElementById("renwushu").innerHTML = a;1130document.getElementById("yinyangling").innerHTML = b;1131document.getElementById("shengmingyin").innerHTML = c;1132 ...

Full Screen

Full Screen

audio.js

Source:audio.js Github

copy

Full Screen

1 // WAVESURFER JS START2 3 document.addEventListener("DOMContentLoaded", function() {4 const AllAudio = () => {5 6 }7 8 // A U D I O 1 9 10 let story1 = WaveSurfer.create({11 container: '#story1',12 waveColor: '#fff',13 progressColor: '#FFB002'14 });15 16 story1.load('../audio/story-1.mp3');17 18 story1.on('ready', function() {19 story1.pause();20 story1.setVolume(1);21 });22 23 document24 .querySelector('[id="pills-first-tab"]')25 .addEventListener('click', story1.playPause.bind(story1));26 27 // A U D I O 228 29 let story2 = WaveSurfer.create({30 container: '#story2',31 backend: 'MediaElement',32 waveColor: '#fff',33 progressColor: '#FFB002'34 });35 36 story2.load('../audio/story-2.mp3');37 38 story2.on('ready', function() {39 story2.pause();40 story2.setVolume(1);41 });42 43 document44 .querySelector('[data-action="story2"]')45 .addEventListener('click', story2.playPause.bind(story2));46 47 // A U D I O 348 49 let story3 = WaveSurfer.create({50 container: '#story3',51 waveColor: '#fff',52 progressColor: '#FFB002'53 });54 55 story3.load('../audio/story-3.mp3');56 57 story3.on('ready', function() {58 story3.pause();59 story3.setVolume(1);60 });61 62 document63 .querySelector('[data-action="story3"]')64 .addEventListener('click', story3.playPause.bind(story3));65 66 // A U D I O 467 68 let story4 = WaveSurfer.create({69 container: '#story4',70 waveColor: '#fff',71 progressColor: '#FFB002'72 });73 74 story4.load('../audio/story-4.mp3');75 76 story4.on('ready', function() {77 story4.pause();78 story4.setVolume(1);79 });80 81 document82 .querySelector('[data-action="story4"]')83 .addEventListener('click', story4.playPause.bind(story4));84 85 // A U D I O 586 87 let story5 = WaveSurfer.create({88 container: '#story5',89 waveColor: '#fff',90 progressColor: '#FFB002'91 });92 93 story5.load('../audio/story-5.mp3');94 95 story5.on('ready', function() {96 story5.pause();97 story5.setVolume(1);98 });99 100 document101 .querySelector('[data-action="story5"]')102 .addEventListener('click', story5.playPause.bind(story5));103 104 // A U D I O 6105 106 let story6 = WaveSurfer.create({107 container: '#story6',108 waveColor: '#fff',109 progressColor: '#FFB002'110 });111 112 story6.load('../audio/story-6.mp3');113 114 story6.on('ready', function() {115 story6.pause();116 story6.setVolume(1);117 });118 119 document120 .querySelector('[data-action="story6"]')121 .addEventListener('click', story6.playPause.bind(story6));122 123 // A U D I O 7124 125 let story7 = WaveSurfer.create({126 container: '#story7',127 waveColor: '#fff',128 progressColor: '#FFB002'129 });130 131 story7.load('../audio/story-7.mp3');132 133 story7.on('ready', function() {134 story7.pause();135 story7.setVolume(1);136 });137 138 document139 .querySelector('[data-action="story7"]')140 .addEventListener('click', story7.playPause.bind(story7));141 142 // A U D I O 8143 144 let story8 = WaveSurfer.create({145 container: '#story8',146 waveColor: '#fff',147 progressColor: '#FFB002'148 });149 150 story8.load('../audio/story-8.mp3');151 152 story8.on('ready', function() {153 story8.pause();154 story8.setVolume(1);155 });156 157 document158 .querySelector('[data-action="story8"]')159 .addEventListener('click', story8.playPause.bind(story8));160 161 // A U D I O 9162 163 let story9 = WaveSurfer.create({164 container: '#story9',165 waveColor: '#fff',166 progressColor: '#FFB002'167 });168 169 story9.load('../audio/story-9.mp3');170 171 story9.on('ready', function() {172 story9.pause();173 story9.setVolume(1);174 });175 176 document177 .querySelector('[data-action="story9"]')178 .addEventListener('click', story9.playPause.bind(story9));179 180 // A U D I O 10 181 182 let story10 = WaveSurfer.create({183 container: '#story10',184 waveColor: '#fff',185 progressColor: '#FFB002'186 });187 188 story10.load('../audio/story-10.mp3');189 190 story10.on('ready', function() {191 story10.pause();192 story10.setVolume(1);193 });194 195 document196 .querySelector('[data-action="story10"]')197 .addEventListener('click', story10.playPause.bind(story10));...

Full Screen

Full Screen

consumeHistoryGenerate.js

Source:consumeHistoryGenerate.js Github

copy

Full Screen

1import { v4 } from "uuid"2import helpers from "../helpers"3import {4 CONSUME_HISTORY_TYPE_UNLOCK_STORY,5 CONSUME_HISTORY_EXCHANGE_TYPE_COIN6} from "../constants"7import { getRandomObject } from "../utils"8export default async () => {9 const stories = await helpers.story.getPublishedStory()10 const users = await helpers.user.getByFilter({11 roleFeature: await helpers.roleFeature.getRoleClientId()12 })13 await users.forEach(async user => {14 try {15 let eachstories = stories16 const story1 = getRandomObject(eachstories)17 await helpers.consumeHistory.createConsumeHistory({18 user,19 input: {20 type: CONSUME_HISTORY_TYPE_UNLOCK_STORY,21 exchangeType: CONSUME_HISTORY_EXCHANGE_TYPE_COIN,22 coin: story1.necessaryCoin,23 story: story1.id,24 artist: story1.creator,25 timeStamp: v4()26 }27 })28 eachstories = eachstories.filter(item => item.id !== story1.id)29 const story2 = getRandomObject(eachstories)30 await helpers.consumeHistory.createConsumeHistory({31 user,32 input: {33 type: CONSUME_HISTORY_TYPE_UNLOCK_STORY,34 exchangeType: CONSUME_HISTORY_EXCHANGE_TYPE_COIN,35 coin: story2.necessaryCoin,36 story: story2.id,37 artist: story2.creator,38 timeStamp: v4()39 }40 })41 eachstories = eachstories.filter(item => item.id !== story2.id)42 const story3 = getRandomObject(eachstories)43 await helpers.consumeHistory.createConsumeHistory({44 user,45 input: {46 type: CONSUME_HISTORY_TYPE_UNLOCK_STORY,47 exchangeType: CONSUME_HISTORY_EXCHANGE_TYPE_COIN,48 coin: story3.necessaryCoin,49 story: story3.id,50 artist: story3.creator,51 timeStamp: v4()52 }53 })54 eachstories = eachstories.filter(item => item.id !== story3.id)55 const story4 = getRandomObject(eachstories)56 await helpers.consumeHistory.createConsumeHistory({57 user,58 input: {59 type: CONSUME_HISTORY_TYPE_UNLOCK_STORY,60 exchangeType: CONSUME_HISTORY_EXCHANGE_TYPE_COIN,61 coin: story4.necessaryCoin,62 story: story4.id,63 artist: story4.creator,64 timeStamp: v4()65 }66 })67 eachstories = eachstories.filter(item => item.id !== story4.id)68 const story5 = getRandomObject(eachstories)69 await helpers.consumeHistory.createConsumeHistory({70 user,71 input: {72 type: CONSUME_HISTORY_TYPE_UNLOCK_STORY,73 exchangeType: CONSUME_HISTORY_EXCHANGE_TYPE_COIN,74 coin: story5.necessaryCoin,75 story: story5.id,76 artist: story5.creator,77 timeStamp: v4()78 }79 })80 eachstories = eachstories.filter(item => item.id !== story5.id)81 } catch (error) {82 throw new Error(error)83 }84 })...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run storybook-root automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful