A
A
Arbitr2017-12-09 16:42:11
WordPress
Arbitr, 2017-12-09 16:42:11

How to display a list of child elements when clicking on an element?

Good day, there is a list of parent elements in the form of a table:
5a2be69f17e46959107334.png
How, when you click on the "OPOR" button, display child elements, like this:
5a2be71e4c0cf703881900.png
The difficulty is that there can be many parent elements (more than 9), so it makes sense to give ID everyone is not.
In fact, you need to get an array of these buttons and when you click on the button, display a block with children, but how to fix the array clicks? tell me the algorithm please.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daria Motorina, 2019-09-27
@Valsin

Try get_term_link instead of get_permalink

R
Rsa97, 2017-12-09
@ArBitr_exe

For example, like this: https://jsfiddle.net/n5xxm3h5/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question