I have an html world that looks like this:
<h3>PETIT DEJEUNER</h3> <p>FRANS ONTBIJT</p> <p>CROISSANT</p> <p>CROISSANT</p> <h3>AUTRE PETIT DEJEUNER</h3> <p>FRANS ONTBIJT</p> <p>CROISSANT</p> <p>CROISSANT</p> <h3>AND ONE MORE DEJEUNER</h3> <p>FRANS ONTBIJT</p> <p>CROISSANT</p> <p>CROISSANT</p>
Of course, the content is changing. Unfortunately, I do not control html, it is delivered from another source. Can I split the content on each h3 by creating a collection like this:
menu = [ { title: 'PETIT DEJEUNER', contents: [<p contents>,<p contents>,<pcontents>] }, { title: 'AUTRE PETIT DEJEUNER', contents: [<p contents>,<p contents>,<pcontents>] }, ]
I am using jQuery. Thanks!
source share