How do you remove <li> from a <ul> by Id?
Try this:
$('#secondli').remove();
In jQuery, you refer to the ID of an element with a #
in front of it. See http://api.jquery.com/id-selector/
This will work for you
$('#secondli').remove();
You need to add a space between the select the li element,
$('#second li').remove(); // when referencing by id
or
$(".second li").remove(); // when referencing by class