Skip to content
Advertisement

Pull the headings and display it in a div in a list format

I have a dynamic container .product_section and I need to display the headings inside to div.toc in a UL list format.

Hoping to have a script that checks every .product_section and creates a list using jquery

JavaScript

How can I make this so that it will create a list in every .product_section

so it will be like this

JavaScript

Advertisement

Answer

You can try the following way:

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