Skip to content
Advertisement

keep carousel on same slide after refresh

so i have a bootstrap carousel on my page and i’m trying to change the content of the page depending on which slide in currently showed. i have the current slide index in a javascript variable but can’t transfer the value to php. so i am now getting the value with GET but the php variable’s value don’t change unless i refresh the page, but when i do refresh the page the slides reset to the first one. how can i let the carousel stay on the same slide even after the page is refreshed? thank you

this is my carousel:

JavaScript

and this is my script:

JavaScript

thank you in advance !

Advertisement

Answer

JavaScript

this worked perfectly for me !

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement