I have a php script that fetches the results into lists, but the list come out with the sublists in the bottom of the ul, this script isnt mine but im trying to sort the sublist into their right place.
results are like this now:
<ul id='list'>
<li class='47'>DVD</li>
<li class='48'>Spill</li>
<li class='49'>Utstyr</li>
<ul class='sublist 49' style='display:none;'>
<li>Dvd spillere</li>
<li>Dvd/Blueray spillere</li>
</ul>
<ul class='sublist 47' style='display:none;'>
<li>Barnefilmer</li>
<li>Voksen filmer</li>
</ul>
</ul>
But all with sublist 47 should be under li class 47.
Is there any way to have jquery sort out this?