JQuery children element set event
<p>Im trying to create an event for each (a) element in a list (ul). But im doing something wrong</p>

<pre><code>function EnableAjaxOnMenu(ElementID, TagName) {

    var elm = jQuery("#" + ElementID).children(TagName).click(function () {

        GetPageByUrl(jQuery(this).attr("href"));
        //ChangeSelectedMenuItem(this);
        return false;
    });

}
</code></pre>

<p>Does anyone know what im doing wrong here, as far as I can see it won't even create an event?</p>
