PokemonJourney

Developer
Size
2,688 Kb
Views
60,720

How do I make an pokemonjourney?

What is a pokemonjourney? How do you make a pokemonjourney? This script and codes were developed by Yang Li on 13 July 2022, Wednesday.

PokemonJourney Previews

PokemonJourney - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>PokemonJourney</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="kanto"> <div id="pallet"> <img id="ash" src="http://i613.photobucket.com/albums/tt214/Aipom77/Ash/ash.png" alt=""/> </div> <div id="viridian_c"></div> <div id="viridian_f"></div> <div id="pewter_c"></div> <div id="cerulean_c"></div> <div id="vermillion_c"></div> <div id="saffron_c"></div>
</div>
<button>Start</button> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

PokemonJourney - Script Codes CSS Codes

#kanto { width: 1025px; height: 695px; background-image: url("http://img09.deviantart.net/dc11/i/2011/091/5/6/pokemon_kanto_map_hgss_by_cow41087-d3d00i0.jpg"); position: relative;
}
img { width: 50px;
}
#pallet { position: absolute; left: 300px; top: 500px
}
#viridian_c { position: absolute; left: 300px; top: 320px
}
#viridian_f { position: absolute; left: 300px; top: 260px
}
#pewter_c { position: absolute; left: 280px; top: 150px
}
#cerulean_c { position: absolute; left: 560px; top: 200px
}
#vermillion_c { position: absolute; left: 560px; top: 400px
}
#saffron_c { position: absolute; left: 560px; top: 290px
}

PokemonJourney - Script Codes JS Codes

// We are going to recreate Ash Ketchum's journey from Pallet Town to Saffron City
function journey1(){ // 1. Ash goes to Viridian City and is joined by Misty $("#viridian_c").append($("#ash")).append($('<img id="misty" src="http://4.bp.blogspot.com/-oKGBS7Zbbh0/VJzI1NhGdEI/AAAAAAAAtHo/9lBePsQXxgk/s1600/misty4.png" alt="" />'));
}
function journey2(){ // 2. Ash and Misty go to the Viridian forest $("#viridian_f").append($("#ash")).append($("#misty"));
}
function journey3(){ // 3. Ash and Misty arrive at Pewter City and are joined by Brock $("#pewter_c").append($("#viridian_f img")).append($('<img id="brock" src="http://vignette4.wikia.nocookie.net/pokemon/images/0/0a/Brock_OS_anime.png/revision/latest?cb=20150915072500" alt="" />'));
}
function journey4(){ // 4. Misty leaves group to avoid going to Cerulean City $("#misty").remove();
}
function journey5(){ // 5. Ash and Brock arrive in Cerulean City and find Misty is the gym leader! $("#cerulean_c").append($("#pewter_c img")).append($('<img id="misty" src="http://4.bp.blogspot.com/-oKGBS7Zbbh0/VJzI1NhGdEI/AAAAAAAAtHo/9lBePsQXxgk/s1600/misty4.png" alt="" />'));
}
function journey6(){ // 6. The friends go to Vermillion City $("#vermillion_c").append($("#cerulean_c img"));
}
function journey7(){ // 7. The friends face some difficulty (longer delay) and end up in Saffron City $("#saffron_c").append($("#vermillion_c img"));
}
// Queuing functions to run one after the other
// Interesting way to format functions in JS - relates to functional programming and JS callbacks
$("button").click(function(){ $( "#kanto" ) .delay(2000) .queue(function( next ) { journey1(); next(); } ) .delay(2000) .queue(function( next ) { journey2(); next(); } ) .delay(2000) .queue(function( next ) { journey3(); next(); } ) .delay(2000) .queue(function( next ) { journey4(); next(); } ) .delay(2000) .queue(function( next ) { journey5(); next(); } ) .delay(2000) .queue(function( next ) { journey6(); next(); } ) .delay(6000) .queue(function( next ) { journey7(); next(); } )
})
PokemonJourney - Script Codes
PokemonJourney - Script Codes
Home Page Home
Developer Yang Li
Username aussieyang
Uploaded July 13, 2022
Rating 3
Size 2,688 Kb
Views 60,720
Do you need developer help for PokemonJourney?

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!

Yang Li (aussieyang) Script Codes
Create amazing Facebook ads with AI!

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!