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 8658271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:43:25+00:00 2026-06-12T15:43:25+00:00

EDIT – I have now got a working counter for the right answer and

  • 0

EDIT – I have now got a working counter for the right answer and done exactly the same for wrong answers but cannot get it working. It will not count more than one – http://jsfiddle.net/smilburn/Dxxmh/33/

I am creating a spelling game for children where empty spaces are highlighted in a grid and clues are given to spell the word correctly by clicking the corresponding letters on the side of the grid.

If you get the word right the space in the grid fades away with the use of “wordglow2”. If you get it wrong it glows red with “wordglow4”.

In my spelling game I want to count the number of right and wrong attempts of the words, and then show them at the end.

I have created a div in the HTML called “counter” Which should display the correct answers, but after 1 correct answer it doesn’t keep count.

Here is the script

var completeLetters = $('.wordglow2').length;
var threeLetter = (completeLetters / 3);
var rightWords = $(threeLetter).length;
    $('.counter').text(rightWords).show();

        if (threeLetter == 3) {
            $('table').fadeOut(2000);

            }

I have tried to create a variable called “rightWord” that takes the length of the “threeLetter” and then displays it through the counter. It counts up to 1 then stops.

  • 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-12T15:43:26+00:00Added an answer on June 12, 2026 at 3:43 pm
    var threeLetter = (completeLetters / 3);
    

    threeLetter is number

    var rightWords = $(threeLetter).length;
    

    here you trying to select number

    This game contain errors and it crash my browser, but count is working in this demo: http://jsfiddle.net/Dxxmh/29/

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

Sidebar

Related Questions

EDIT: See my answer below--> I am wanting to have a view that when
EDIT: Changed as I have a different issue with the same code 2nd Edit:
Edit ok, great feedback here, got me pointed in the right direction. Use case
Edit: This question looks like it might be the same problem, but has no
Edit: I initially accepted thejh's answer, but I wasn't really satisfied with it since
EDIT: This question was originally about checkboxes, but I am getting the same behavior
EDIT: I'm using MySQL, I found another post with the same question, but it's
Edit: I have solved this by myself. See my answer below I have set
EDIT I now have this code: public void sendMessage(View view) { Intent intent =
EDIT : I have edited the OP with all the suggestions I got from

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.