0
Why the image sliding code is not running
9 odpowiedzi
+ 4
Avinash Are those local file images loading in the browser? If so, I learned something new. 🤔
When anyone else attempts to run your code, we will only see broken images because we don't have those images on our local devices. If this is loadings on your device, it wouldn't load from your computer because the images are only on your device.
If the images load for you, what specifically happens when you click the buttons? Do the images change or is there no change? If no change, are there any error messages?
If the images do change, then are you expecting the transition effect to show sliding movement?
Are you able to see the images load and change with button clicks in Arnesh's code?
I'm just trying to get a sense of what you mean by "not sliding".
+ 3
document.getElementsById.
^
Delete the 's'.
And put a '>' after the link tag.
+ 2
1) You have that incomplete link tag.
2) There is no document.getElementsById but document.getElementById. (Notice the 's')
3) Your function was named 'pre' and you have been calling the 'prev' function. It should be 'prev'.
4) Use num.length and not num.le
Your images won't load in sololearn. See this:
https://www.sololearn.com/discuss/1392261/?ref=app
Here is your edited code:
https://code.sololearn.com/WmuyxUeLIjuA/?ref=app
+ 2
Check the url if it is correct.
+ 1
Stop using shortcuts eg: num.le instead of num.length
You can getElementsById instead use
** document.getElementById
0
I did all the necessary changes neither image is sliding in sololearn or my laptop
0
Pranav Kalro thanks man . But the image is not being sliding in my computer.
0
It's a local image url of your laptop hence work only on laptop if correct .
Prepend/add file:/// before link might it works.
It's necessary when I use to link img in my phone local img file
example_
file:///storage/emulated/0/Download/download.jpeg
0
Someone David Carroll help nedded