im kinda new to js , when i want to load an image as a background picture , there is a white background bcz of loading image file , what should i do for it ? here is my code :
const all_pages = ['visual', 'idea', 'decoration', 'digital-marketing', 'print']
function onCircleClick(page_id) {
for (const page of all_pages) {
document.getElementById(page).style.display = 'none'
}
document.getElementById(page_id).style.display = 'block'
$(`#${page_id}`).chainFade({ toThe: 'left' })
switch (page_id) {
case 'visual':
document.getElementById("ability").style.backgroundImage = "url('static/img/skill/visual-min.jpg')"
break;
case 'idea':
document.getElementById("ability").style.backgroundImage = "url('static/img/skill/idea-min.jpg')"
break;
case 'decoration':
document.getElementById("ability").style.backgroundImage = "url('static/img/skill/decor-min.jpg')"
break;
case 'print':
document.getElementById("ability").style.backgroundImage = "url('static/img/skill/print-min.jpg')"
break;
case 'digital-marketing':
document.getElementById("ability").style.backgroundImage = "url('static/img/skill/deigital-min.jpg')"
break;
}