I would like to add a class to each <a> or <li> that is the same value as $(this).val() in the code.
options.each(function(){
$("#target dd ul").append('<li><a href="#">' +
$(this).text() + '<span class="value">' +
$(this).val() + '</span></a></li>');
});
I am thankful for any hints!
1 Answer