How to make unordered lists selectable in javascript?

566 views Asked by At

I have got List of Unordered lists from server.How to make each unordered list selectable injavasript

here am getting list of of ip addresses in my server. I need to make each list item clicable

results.classList.remove('working');

if (opt_error) {
  var s = document.createElement('strong');
  s.classList.add('warning');
  s.innerText = opt_error;
  results.appendChild(s);
  return console.warn(opt_error);
}

var outer = finder.services;
var inner = finder.ips;

// TODO: render information about outer/inner
// for IPs, render 'last seen at...'
// for services, render known service type.

results.innerHTML = '';
outer.apply(finder).forEach(function(o) {
  var li = document.createElement('li');
  li.innerHTML = getHtml_(outer, o);
  results.appendChild(li);

  var ul = document.createElement('ul');
  inner.call(finder, o).forEach(function(i) {
    var li = document.createElement('li');
    li.innerHTML = getHtml_(inner, i);
    ul.appendChild(li);
  });
  ul.childNodes.length && results.appendChild(ul);
});
};
0

There are 0 answers