Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <link rel="stylesheet" href="css/01.css">
- </head>
- <body>
- <div class="main">
- </div>
- <div class="bg"></div>
- <script src="js/jquery-3.2.1.js"></script>
- <script>
- var a = 0;
- var d = 0;
- var c = 0;
- $(document).ready(function(){
- for(a = 0;a < 80;a++){
- $(".main").append('<div class="b" id="'+a+'" style="position:absolute;left:'+d+'%;top:'+c+'px;">'+a+'<br>'+d+'%<br>'+c+'px</div>');
- d = d+10;
- if(a%10==9){
- c = c+109;
- d=0;
- }
- };
- i=0;
- var a_y = new Array();
- v=0;
- $("div.b").mouseover(function(){
- v = $(this).attr("id");
- if(a_y.indexOf(v)==-1){
- a_y.push(v);
- $(this).fadeOut();
- i++;
- if(i==80){
- $(".bg").fadeIn(5000);
- }
- }
- });
- });
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment