Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8728805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:43:05+00:00 2026-06-13T08:43:05+00:00

I am creating a simple numeracy game where by there is a grid populated

  • 0

I am creating a simple numeracy game where by there is a grid populated with numbers. The numbers are hidden and when the game is run the grid space is highlighted. A div on the side produces a sum to help the user get the correct answer. The user then clicks the corresponding numbers that animate into position and signal whether they are right or wrong.

I have but in a next button (‘.minibutton’), so that if the user gets the answer wrong 3 times they have a chance to move to the next question. The button also has a .trigger(‘click’) function so that when a word is completed correctly it moves on automatically and keeps the game flowing.

My problem is the button has stopped working and I am clueless as to why. Here is the “.minibutton” function…

$('.minibutton').click(function() {
var sum = $('#answerlist li[data-answer="' + answer + '"]').data('sum');
$(right).val('');
$(wrong).val('');
$('td').removeClass('spellanswer');
score.wrong = 0;
var r = rndanswer;
while (r == rndanswer) {
    rndanswer = Math.floor(Math.random() * (listOfanswers.length));
}

when I added this statement the button stopped working

 //for (var x = 0; x < listOfanswers.length; x++) {
    //if (eval(sum.replace("=", "").replace("x", "*")) == listOfanswers[x].name) {
       // rndanswer = x;
   // }
//}

$('td[data-answer="' + listOfanswers[rndanswer].name + '"]').addClass('spellanswer');
$('td[data-answer=' + answer + ']').removeClass('answerglow').removeClass('answerglow4').removeClass('answerglow3').css('color', 'transparent');

var noExist = $('td[data-answer=' + listOfanswers[rndanswer].name + ']').hasClass('answerglow2');
if (noExist) {
    $('.minibutton').prop('disabled', false);

} else {

    $('.sumstyle').text(sum);
    sum.hide();

}
}).trigger("click");

http://jsfiddle.net/ZAfVZ/28/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:43:05+00:00Added an answer on June 13, 2026 at 8:43 am

    Running the jsFiddle gives this error:

    Object 1 + 2 = has no method 'hide'
    

    You’re trying to hide a string, which is obviously wrong. It’s causing the script to stop executing after that point. Remove/comment out sum.hide(), and the ‘next’ button appears after three wrong guesses.

    I’ve edited the JSFiddle to define sum (a text string containing the sum that the player is trying to answer) and seumElem (the HTML element containing the sum) at the top of the function: http://jsfiddle.net/ZAfVZ/30/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a simple numeracy game where by there is a grid populated
Creating a simple RPG game, first time using XNA. Trying to get my character
I am creating a simple web app. There is a <video> element on the
Im creating a simple image gallery. And I mean simple: <div id=outerdiv style=width:600px;height:400px; background:#ccc;padding:50px;>
i am creating simple side menu, such that when the user hover on item
I am creating simple chess board game in java, and they are running smoothly,
I'm creating a simple tic tac toe game. I initialized my 3x3 board using
Im creating a simple vehicle and projectile simulation game in WPF using C#. I
Im creating a simple bowling game using OOP, and i want to have a
I'm creating simple example on JSF. It's small Login application. My problem is duplicate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.