PKMN
How do I make an pkmn?
What is a pkmn? How do you make a pkmn? This script and codes were developed by Ash on 09 August 2022, Tuesday.
PKMN - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>PKMN</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="wrap"> <div id="nonSelected" class="container"> </div> <div id="selected" class="container"> <div id="info"> <div class="btn save">SAVE PKMN</div> <div class="btn new">CLEAR PKMN</div> <div id="stats"></div> <div id="pokemon"> </div> </div> </div>
</div>
<!--container--> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
PKMN - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Hind);
body { font-family: 'Hind', sans-serif; background: linear-gradient(45deg, white 25%, #eee 25%, #eee 50%, white 50%, white 75%, #eee 75%); background-size: 50px 50px; animation: animatedBackground 40s linear infinite;
}
@keyframes animatedBackground { from { background-position: 0px 0px; } to { background-position: 0px 100vh; }
}
.wrap { margin: 20px auto; width: 50%; display: flex; flex-direction: row; align-items: flex-start; justify-content: flex-start; background: #eee; box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.2);
}
.container { display: flex; flex-direction: row; align-items: stretch; justify-content: flex-start; flex-wrap: wrap;
}
#nonSelected { display: flex; min-width: 50%; flex-direction: row; align-items: stretch; justify-content: space-between; background-color: #ccc; padding: 10px; box-shadow: 4px 4px 1px rgba(0, 0, 0, 0.2); z-index: 99; position: relative; top: -10px; left: -10px;
}
#selected { min-width: 40%; flex-grow: 1; background-color: #eee; padding: 10px;
}
#stats { padding: 10px;
}
#info { display: block; flex-grow: 1; background-color: #fff; padding-top: 10px; box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.2);
}
img { object-fit: none; /* Do not scale the image */ object-position: center; /* Center the image within the element */ height: 90px; width: 90px;
}
.btn { background: #ddd; display: inline-block; padding: 2px 10px; margin: 5px; box-shadow: 5px 5px 1px rgba(0, 0, 0, 0.2);
}
.btn:hover { background: #eee; position: relative; top: 2px; left: 2px; box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}
#pokemon { display: flex; flex-direction: row; align-items: stretch; justify-content: flex-start; flex-wrap: wrap;
}
.innerdiv { text-align: center;
}
PKMN - Script Codes JS Codes
var currentPokemon = 0;
var maxPokemon = 6;
$( document ).ready(function initial() { $("#stats").prepend(currentPokemon + " Pokemon Selected"); loadapi();
});
$("#nonSelected").on("click", (".innerdiv"), function move() { if ($(this).parent().attr("id") == "nonSelected" && currentPokemon < maxPokemon) { $(this).appendTo('#pokemon').addClass('.selectedimg'); currentPokemon++; console.log(currentPokemon); $("#stats").html(currentPokemon + " Pokemon Selected"); } else if (currentPokemon == maxPokemon) { $("#stats").html(currentPokemon + " Pokemon Selected Your team is full!"); }
});
$("#selected").on("click", (".innerdiv"), function moveback() { $(this).prependTo('#nonSelected').removeClass('.selectedimg');
currentPokemon--; console.log(currentPokemon); $("#stats").html(currentPokemon + " Pokemon Selected");
});
$("#selected").on("click", (".new"), function clear() { $(".innerdiv").prependTo('#nonSelected').removeClass('.selectedimg'); currentPokemon = 0; $("#stats").html(currentPokemon + " Pokemon Selected");
});
function loadapi() { console.log("We're ready!"); function letsGetPokemon() { for(wishedNo = 0; wishedNo < 10; wishedNo ++){ function getRandomPokemonID() { return Math.floor(Math.random() * (151 - 1)) + 1; } var pokeUrl = "http://pokeapi.co/api/v2/pokemon/" + getRandomPokemonID(); $.ajax({ url: pokeUrl, type: "GET", dataType: "json", success: function(data) { var pokeName = data.name, pokeSprite = data.sprites.front_default; $("#nonSelected").append ("<div class='innerdiv'>" +pokeName+ "<br><img src='" +pokeSprite+ "'></div>"); } }) .fail(function() { console.log("There was a problem handling the request"); }) .always(function() { console.log("The request finished"); }); }} letsGetPokemon();
};
Developer | Ash |
Username | littleginger |
Uploaded | August 09, 2022 |
Rating | 3 |
Size | 3,802 Kb |
Views | 32,384 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Cute Tags | 3,091 Kb |
Sky Clock | 2,973 Kb |
Contact form | 2,294 Kb |
Travel Site Demo | 2,899 Kb |
RSS Feed | 3,083 Kb |
Telescope | 2,241 Kb |
Codepen profile CSS | 2,345 Kb |
Cute Bunny | 3,761 Kb |
Pixel Cafe Menu | 5,209 Kb |
CSS Isometric Pokemon | 4,874 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Sass random color animation | Jotavejv | 4,827 Kb |
Slick Slider | Wearebold | 5,913 Kb |
Testimonial Fancy tabs responsive | Amit-webdesigner | 3,056 Kb |
Testing Portfolio Page | Sideshowli | 3,395 Kb |
Opening Reveal Modal On Document Ready | Winghouchan | 1,787 Kb |
Form Labels | Bartuc | 2,717 Kb |
Dice | Fraina | 5,026 Kb |
A cube | KyleDavidE | 18,627 Kb |
LAMP PURE CSS with Animation | Dam62500 | 2,911 Kb |
Loading... | Adamjacob | 2,384 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!