I am using this https://codepen.io/toschivictor/pen/JjNZjEj
I need to replace icons with images,
so I replaced these icons
const items = [
'π',
'β',
'βοΈ',
'π¦',
'π',
'π©',
'π»',
'π»',
'π΅',
'π€‘',
'π¦',
'π',
'π',
'π',
];
with below code,
const items = [
'<img src="image.jpg">',
'<img src="image.jpg">',
'<img src="image.jpg">',
'<img src="image.jpg">',
'<img src="image.jpg">',
'<img src="image.jpg">',
'<img src="image.jpg">',
'<img src="image.jpg">',
'<img src="image.jpg">',
];
However it is displaying the tag itself instead of showing image,
which tag or which style or which js function causing this?
>Solution :
Hi @arun
You need to append these tag as HTML elements, not as text.
You need that:-
box.innerHTML = pool[i];
not that:-
box.textContent = pool[i];