I'm binding (or at least trying to) a function for each li element under a ul.

But the event never fires. Take a look at the code below, the alert saying "foo"
is showing, but the next one saying "bar" is supposed to show once a click 
on the li tag is invoked. 

```
function set_search_value() 
{
    var e = document.getElementById("res_ls");

    alert("foo");
    for (var i = 0; i < e.children.length; i++) 
    {
        e.children[i].onclick = function() {
            alert("bar");
        }
    }
}

```

HTML 

```
<ul id="res_ls" class="visible">
 <li><span><span class="highlighted">test</span>ing.com</span> <span>(181)</span></li>
</ul>

```