Im trying to integrate a slashdot style drop menu into my V7 website by using the yahoo section script and dropping the relevent tags around the sections.
The part im stuck on is like this....i need to wrap a <div> tag around the top section and close it after the last child section under that section </div>
so example
<div>
top section
child section
child section
</div>
and this format needs to be repeated across all parent and child sections regardless of how many subsections there are......im using the
strIDs += '';
ive already got the <div> sorted so i just need to close it......so i need something similar to this:
if (j=ar[i].pChild.length)
{strIDs += '</div>';
}
something which basically says if its the last child in the section.....stick a </div> after it....but what i have doesnt work
any ideas would be greatly welcomed.
The part im stuck on is like this....i need to wrap a <div> tag around the top section and close it after the last child section under that section </div>
so example
<div>
top section
child section
child section
</div>
and this format needs to be repeated across all parent and child sections regardless of how many subsections there are......im using the
strIDs += '';
ive already got the <div> sorted so i just need to close it......so i need something similar to this:
if (j=ar[i].pChild.length)
{strIDs += '</div>';
}
something which basically says if its the last child in the section.....stick a </div> after it....but what i have doesnt work
any ideas would be greatly welcomed.
Comment