Modified the logic in the onNext() and onPrev() functions to handle the edge cases correctly and cycle back to the first/last anchor when reaching the end/beginning.
Removed the unnecessary check for current == -1 in the onPrev() function.
Corrected the
tag syntax by converting the attribute values to lowercase.
Fixed the incorrect behavior of the "prev" button by adjusting the logic in the onPrev() function.
Modified the logic in the onNext() and onPrev() functions to handle the edge cases correctly and cycle back to the first/last anchor when reaching the end/beginning.
Removed the unnecessary check for current == -1 in the onPrev() function.
Corrected the
Fixed the incorrect behavior of the "prev" button by adjusting the logic in the onPrev() function.