I have to following code:
$( ".content.one" ).clone().appendTo( ".cat.one .details" );
$( ".content.two" ).clone().appendTo( ".cat.two .details" );
$( ".content.three" ).clone().appendTo( ".cat.three .details" );
I wanted to loop this like
var obj = {
one: 'one',
two: 'two',
three: 'three'
};
$.each(obj, function (index, value) {
$( ".content.(value)" ).clone().appendTo( ".cat.(value) .details" );
});
But I can't find out how to use the "value" inside the classes