Convert from JavaScript to jQuery Syntax?
<p>Is there in the world any tool or sample-based tutorial on converting JavaScript to jQuery Syntax?
Not scattered documentation but sample-based converting.</p>

<p>Need to re-write this snippet:</p>

<pre><code>var cssmenuids = ["navmenu"];
var csssubmenuoffset = -1;

function createcssmenu()
{
    for (var i = 0; i &lt; cssmenuids.length; i++)
    {
        var ultags = document.getElementById(cssmenuids[i]).getElementsByTagName("ul");
        for (var t = 0; t &lt; ultags.length; t++)
        {
            ultags[t].style.top = ultags[t].parentNode.offsetHeight + csssubmenuoffset + "px";
            ultags[t].parentNode.onmouseover = function()
            {
                this.style.zIndex = 100;
                this.getElementsByTagName("ul")[0].style.visibility = "visible";
                this.getElementsByTagName("ul")[0].style.zIndex = 0;
            }
            ultags[t].parentNode.onmouseout = function()
            {
                this.style.zIndex = 0;
                this.getElementsByTagName("ul")[0].style.visibility = "hidden";
                this.getElementsByTagName("ul")[0].style.zIndex = 100;
            }
        }
    }
}

if (window.addEventListener)
    window.addEventListener("load", createcssmenu, false);
else if (window.attachEvent)
    window.attachEvent("onload", createcssmenu);
</code></pre>

<p>Related question &amp; Final answer <a href="http://stackoverflow.com/questions/16035139/javascript-to-jquery-syntax-building-custom-css-horizontal-menu">JavaScript to jQuery syntax Building custom CSS horizontal menu</a></p>
