Skip to content

Commit 8758d27

Browse files
author
rwieberdink
committedSep 16, 2018
responsive img css
1 parent d6c65f4 commit 8758d27

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎assets/javascript/app.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function correct(){
164164
//Display
165165
$("#verbalResponse").html(verbalResponse[0]).show();
166166
$("#correctAnswer").html(correctAnswer[i]).show();
167-
$("#gif").html("<img src='" + gifArray[i] + "'>").show();
167+
$("#gif").html("<img src='" + gifArray[i] + "' class='img-responsive' style='margin:0 auto;'>").show();
168168
//Hide other divs
169169
$("#timeLeft").hide();
170170
$(".rowQuestion").hide();
@@ -179,7 +179,7 @@ function incorrect() {
179179
//Display
180180
$("#verbalResponse").html(verbalResponse[1]).show();
181181
$("#correctAnswer").html(correctAnswer[i]).show();
182-
$("#gif").html("<img src='" + gifArray[i] + "'>").show();
182+
$("#gif").html("<img src='" + gifArray[i] + "' class='img-responsive' style='margin:0 auto;'>").show();
183183
//Hide other divs
184184
$("#timeLeft").hide();
185185
$(".rowQuestion").hide();
@@ -195,7 +195,7 @@ function unanswered(){
195195
//Display
196196
$("#verbalResponse").html(verbalResponse[2]).show();
197197
$("#correctAnswer").html(correctAnswer[i]).show();
198-
$("#gif").html("<img src='" + gifArray[i] + "'>").show();
198+
$("#gif").html("<img src='" + gifArray[i] + "' class='img-responsive' style='margin:0 auto;'>").show();
199199
//Hide other divs
200200
$("#timeLeft").hide();
201201
$(".rowQuestion").hide();
@@ -212,7 +212,7 @@ function finalScore(){
212212
$(".rowAnswers").hide();
213213
$("#verbalResponse").html(verbalResponse[2]).attr("style", "display: none");
214214
$("#correctAnswer").html(correctAnswer[i]).attr("style", "display: none");
215-
$("#gif").html("<img src='" + gifArray[i] + "'>").attr("style", "display: none");
215+
$("#gif").html("<img src='" + gifArray[i] + "' class='img-responsive' style='margin:0 auto;'>").attr("style", "display: none");
216216
//Displays
217217
if (userCorrect >= 9) {
218218
praise = "Merlin's Beard! You've achieved the rank of HEADMASTER!";

0 commit comments

Comments
 (0)
Please sign in to comment.