In my case, I have two distinct pages: let's call them the first and second pages.
On the first page, I utilize an owl carousel slider with a tag that links to a specific slide on the second page's owl carousel slider using an ID. Meanwhile, on the second page, there are previous and next buttons that change names each time the user switches slides to guide them. Everything seems to work fine until the user navigates from the first page to the second one and attempts to click the previous button right away, which doesn't function correctly. However, if they click the next button first and then the previous one, it works as intended. Here are the relevant code snippets:
FIRST PAGE
<div class="owl-carousel home-page-project-design home-page-manufacturing-list">
<a href="../project-design-showcase.php#walk-in-wardrobes">
...
content goes here
...
</a>
... more similar layout for other sections ...
</div>
SECOND PAGE
<section class="next-and-previous-title-showcase">
...
additional details displayed in this section can be found here
...
</section>
<div class="owl-carousel test3">
...
include corresponding files for different carousel slides
...
</div>
<script>
...
jQuery script inside this section controlling the functionality of the carousel
...
</script>