+ 2
JavaScript doesn't change html text sometimes
Sometimes I have a problem with changing html text parts with JavaScript. I use a function with a if-else, everytime it goes through it checks if my button has the specific id. This works fine it checks and I can alert something but when I want to change a text with document.getElementById"everywhere_same_id".textContent or innerHtml = specific_text_var_for__each_ button it's doesn't change my text everytime. And I declared for each of the specific_text_var_for_a_button a text. For the whole project I used webslides.js for sliding effects. I use VSCode and I tested the page on MS Edge and on a mobile device with Firefox.
1 Odpowiedź
+ 1
Do you mind showing the piece of code? Because from your explanation I get no idea what is causing the problem.