I'm trying to remove some li lines of html.
This is the html:

This is the jquery I'm trying to use:
$("li").remove(":contains('undefined')");
Thanks for the help!
I'm trying to remove some li lines of html.
This is the html:

This is the jquery I'm trying to use:
$("li").remove(":contains('undefined')");
Thanks for the help!
You can try:
$("li:contains('undefined')").remove();
$("li").remove(":contains('undefined')"); wouldn't. From what I can tell, it looks valid$("li").remove(":contains('undefined')"); actually work for me...Try:
$("li span:contains('undefined')").remove();
It works in my head :)
EDIT This will remove the LI:
$("li span:contains('undefined')").parent().parent().remove();
span, not the li