< - start of code - >
{
// Check we're working with a DOM compliant browser
if (document.getElementById && document.createElement)
{
var objMenu = document.getElementById('mainnav');
var objNested = objMenu.getElementsByTagName('ul');
// Hide each of the nested unordered list
for (var i=0; i
objNested[i].style.display = 'none';
}
}
< - end of sample - >
The codes above give you the function of hiding various nested lists on either your internet site or your Flash program. Hiding such nested lists in a functional manner are the main interactive feature of such platforms, regardless of the machine you are using for internet and Flash animation viewing, such as
handheld electronic gizmos and desktop PCs. Thus, you are one step ahead in creating your internet site to be as interactive as it is visually appealing and informative.
Also, try to know and use the other scripting features brought about by JavaScript programming for either your web development endeavours or your Flash programming ventures. This would increase functionality of your digital creations. The codes above are among the prime examples of simple scripting which would make your creations more interactive. Adding a little creativity to the functions of the script would definitely boost the performance of the script itself.
So, in hiding various
nested lists either on your web documents or your Flash program creations, it would thus be best to use the script above over HTML, XHTML, and Flash nested list function codes. Just remember to carefully integrate the functions on the overall markup language you are using with regards to web development and design. Keep posted for some simpler scripts that would provide your programming creations more interactivity and functionality.