please check mu slider there doesnt work .disabled | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

please check mu slider there doesnt work .disabled

// Slider Funcktion window.onload = function () { let pictures = [ "https://popgun.ru/files/g/220/orig/7003803.jpg", "https://avatars.mds.yandex.net/get-pdb/1366512/d92cc5b6-f470-445f-805c-277949c438d3/s1200?webp=false", "https://avatars.mds.yandex.net/get-zen_doc/174930/pub_5c00278ba85a4f050557329f_5c002f0d6f26cb04e3dbd450/scale_1200" ]; let y=0; let prev0 = document.getElementById('prev'); let next0 = document.getElementById('next'); let slider = document.getElementById("FuckenChit"); prev0.addEventListener('click',prevShow); next0.addEventListener('click',nextShow ); slider.src = pictures[y]; function prevShow(){ y--; if(y<0) { y=pictures.length-1; prev0.disabled = true; } next0.disabled = false; slider.src = pictures[y]; } function nextShow() { y++; if(y>=pictures.length) { y=0; next0.disabled = true; } prev0.disabled = false; slider.src = pictures[y]; } }

11th Apr 2020, 8:14 PM
Темурбек Машарипов
Темурбек Машарипов - avatar
1 Answer
0
You'll better advised to share a link to a code playground project where you had save your whole code (html/css/js): actually, you provide only the js script, and we cannot guess wich elements you're accessing and attempting to set the disabled attribute... Anyway, I gyess you're misusing this attribute: it only apply/works on form controls in major browsers... more about that here: http://help.dottoro.com/ljaakiqa.php
11th Apr 2020, 10:54 PM
visph
visph - avatar