Часть кода, которая добавляет строки: < /p>
Код: Выделить всё
$('.continue').on('click', function() {
populateQuestion(++currentQuestion);
$('#submit').prop('disabled', false);
if(currentQuestion === 10 && correctAnswers === 10){
$('.jumbotron').html('You got all 10 questions right! Way to go SUPER NERD!');
} else if(currentQuestion === 10 && correctAnswers >= 7){
$('.jumbotron').html('You got ' +correctAnswers+ " questions right! Don't get caught riding nerdy!");
} else if(currentQuestion === 10 && correctAnswers >= 5 ){
$('.jumbotron').html(correctAnswers + ' questions right? You could use a little more nerd in your life.');
} else if(currentQuestion === 10 && correctAnswers >= 3){
$('.jumbotron').html(correctAnswers + '? Wow, what\'s up preppy?');
} else if(currentQuestion === 10 && correctAnswers < 3){
$('.jumbotron').html(correctAnswers + ' for real? At least you got your name right....I hope');
}
});
< /code>
html is: < /p>
Click here to continue
...if you dare!
Подробнее здесь: https://stackoverflow.com/questions/342 ... nditionals