From ab4a3f1c8596a7787d04ed46bbaae7e736d11ec1 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 9 May 2016 21:40:54 +0200 Subject: Fix --- public/js/hebrewparsetrainer.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'public/js') diff --git a/public/js/hebrewparsetrainer.js b/public/js/hebrewparsetrainer.js index ea4e571..a4fb5f7 100644 --- a/public/js/hebrewparsetrainer.js +++ b/public/js/hebrewparsetrainer.js @@ -80,19 +80,15 @@ $(document).ready(function(){ } else { var done = checkInput(true); if ($('#trainer-input-'+input_count).parent().hasClass('has-error')) { + var next = $(''); + next.addClass('btn btn-warning').attr('role', 'button'); + next.click(reloadVerb); if (done) { - var next = $(''); - next.addClass('btn btn-warning').attr('role', 'button'); next.text('Next'); - next.click(reloadVerb); - $('#trainer-input-fancy').html(next); } else { - var skip = $(''); - skip.addClass('btn btn-warning').attr('role', 'button'); - skip.text('Skip'); - skip.click(reloadVerb); - $('#trainer-input-fancy').append(skip); + next.text('Skip'); } + $('#trainer-input-fancy').html(next); } } }); -- cgit v1.2.3