Last changess
This commit is contained in:
parent
5050b36dba
commit
f57dcad25f
26
js/snake.js
26
js/snake.js
@ -184,6 +184,22 @@ $(document).ready(function () {
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
function addTextToAnserws(randomQuestion) {
|
||||
var i = 0;
|
||||
var j = 2;
|
||||
console.log(randomQuestion[1].value);
|
||||
var inputsArrNo = $(".no");
|
||||
var inputNo0 = $(inputsArrNo[0]);
|
||||
var inputNo1 = $(inputsArrNo[1]);
|
||||
var inputNo2 = $(inputsArrNo[2]);
|
||||
inputNo0.next().text(randomQuestion[2].value);
|
||||
inputNo1.next().text(randomQuestion[3].value);
|
||||
inputNo2.next().text(randomQuestion[4].value);
|
||||
|
||||
$('h3').text(randomQuestion[0].value);
|
||||
$('.yes').next().text(randomQuestion[1].value);
|
||||
|
||||
}
|
||||
function showQuestionTask() {
|
||||
|
||||
@ -210,14 +226,10 @@ $(document).ready(function () {
|
||||
if(randomQuestion === null){
|
||||
alert('Pytania nie zostaly dodane. Wciśnij Ok, następnie F5 i dodaj pytania');
|
||||
}
|
||||
|
||||
$('h3').text(randomQuestion[0].value);
|
||||
$('#yes').text(randomQuestion[1].value);
|
||||
$('#no_one').text(randomQuestion[2].value);
|
||||
$('#no_two').text(randomQuestion[3].value);
|
||||
$('#no_three').text(randomQuestion[4].value);
|
||||
$('#popup').fadeIn();
|
||||
randomYes();
|
||||
addTextToAnserws(randomQuestion);
|
||||
$('#popup').fadeIn();
|
||||
|
||||
// $(".popup-item").each(function(index){
|
||||
// var newId = "yes";
|
||||
|
||||
|
@ -25,10 +25,10 @@
|
||||
<h2>Odpowiedz na pytanie!</h2>
|
||||
<br>
|
||||
<h3>Czy lubisz jablka?</h3>
|
||||
<input class="no" class="popup-item" type="radio" value="option1" name="yes_no"><span id="yes">odpowiedz1</span><br>
|
||||
<input class="no" class="popup-item" type="radio" value="option2" name="yes_no"><span id="no_one">odpowiedz2</span><br>
|
||||
<input class="no" class="popup-item" type="radio" value="option3" name="yes_no"><span id="no_two">odpowiedz3</span><br>
|
||||
<input class="no" class="popup-item" type="radio" value="option4" name="yes_no"><span id="no_three">odpowiedz4</span><br>
|
||||
<input class="no" class="popup-item" type="radio" value="option1" name="yes_no"><span class="text">odpowiedz1</span><br>
|
||||
<input class="no" class="popup-item" type="radio" value="option2" name="yes_no"><span class="text">odpowiedz2</span><br>
|
||||
<input class="no" class="popup-item" type="radio" value="option3" name="yes_no"><span class="text">odpowiedz3</span><br>
|
||||
<input class="no" class="popup-item" type="radio" value="option4" name="yes_no"><span class="text">odpowiedz4</span><br>
|
||||
<!-- <button id="accept" type="submit">DALEJ!</button> -->
|
||||
<br><span id="correct">To jest dobra odpowiedz, mozesz grac dalej!</span><br>
|
||||
<!-- <button id="continue_game">Ruszaj dalej!</button> -->
|
||||
|
Loading…
Reference in New Issue
Block a user