Last active
November 22, 2021 01:19
-
-
Save jremi/73876ece01808c0c852b9e4afa6a7547 to your computer and use it in GitHub Desktop.
For loop to display emoji icon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var imgSource = 'http://fonts.voxmedia.com/emoji/unicode/1f4a9.png'; | |
var txtSource = "shit ♥ "; | |
var valueInput = prompt("How many shit faces?"); | |
for (var a = 1; a <= valueInput; a++) { | |
$("#container").add("div").attr('id', "image" + a); | |
$("#image" + a).append("<img class = 'emojiIcon' src=" + imgSource + ">"); | |
$("#container").add("div").attr('id', "text" + a); | |
$("#text" + a).append("<h3 class = 'emojiNumber'>" + txtSource + a + "</h3>"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment