I am appending html code to a div using jquery. Part of that code references a div's id using a concatenated variable from a loop.
$(... +
'<div class="recommendations filter" id="recCards-'+ i +'">' +
'<div><h5>Recommended Cards</h5></div>' +
'<ul></ul>' +
'</div>' +
...
).appendTo('.someDiv');
I'm then trying to append code from another loop into the ul by referencing the ".recommendations" div's ID like so...
var recCardsList = $(div).attr('id', '.recCards-'"+i+"' ul');
$('<div>'+recCardName+'</div>').appendTo(recCardsList);
I've tried every combination of quotation marks that i can think of, but nothing grabs the div correctly to append the new content