This should be easy, but I do not find much online:
I have an unordered list <ul> containing several list items below it <li> , and I would like to address each of them in the list and act on it. How to do it using jQuery?
<ul>
<li>
Thanks.
You can use each () for this.
eg.
$('ul#id li').each(function(index, element) { var li = $(element); // ... });
Something close to this:
$('#myulid').children('li').each(function(i, n) { alert($(this).html()); });
Use this code and modify it if necessary.
$("ul#id_of_desired_ul > li").each(function() { //do stuff // $(this) references each li });