I am building a small achievement list for a website. I'm wondering if there is a possibility to have the list in one js document and then call their respective strings depending on which achievement they've earned. That way I'd have my list in one document and the code in another. How would I go about to create this?
EDIT: Okay, so I'll try to explain a little better with what I have in my mind for this.
<p>Achievement 1 - Some text goes here as well</p>
<p>Achievement 2 - Some text goes here as well</p>
<p>Achievement 3 - Some text goes here as well</p>
<p>Achievement 4 - Some text goes here as well</p>
if(level === 5) {
$('#achievement2').animate({left:"10px"}, function(){
$(this).delay(3500).fadeOut(500).promise();
});
$('.achievementCont').append(Achievement 1);
}