I have html on a variable, how can I do a select on it and then an each on this variable? Example:
var ht = '<div id="1" class="pp">Hi</div><div id="2">Hola</div><div id="3" class="pp"> Bonjour</div>';
$(ht).find(".pp").each( function(i){
var i = this.id;
console.log(i);
});
of course this does not work. Thanks!