Automatically Updating Nav Links | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Automatically Updating Nav Links

I created 2 buttons, prev and next for a website. How do i make it update itself and work based on category? For example, category 1 and 2 are about different topics, how do i make sure the next or previous page isn't from category 2 when it's meant to be on category 1. So essentially, it needs to be able to be a permanent fix on the site, but still change based on the post and category it's on. Any advice or ideas?

4th May 2023, 12:15 AM
Cloudy Sunlight
Cloudy Sunlight - avatar
2 Respostas
+ 2
Cloudy Sunlight it might be easier for someone to understand what you'd like to do if you can post an example. Please read the following to help you with attaching the code: https://code.sololearn.com/Wek0V1MyIR2r/?ref=app
4th May 2023, 6:51 AM
Ausgrindtube
Ausgrindtube - avatar
+ 1
If you mean classifying the different elements of the page by category 1 and 2, you can make it with classes. Example: <div id=ā€œcategory1ā€> <!--Elements in the div--> </div> <div id=ā€œcategory2ā€> <!--Elements in the div--> </div>
4th May 2023, 6:37 AM
Ugulberto SƔnchez
Ugulberto SƔnchez - avatar