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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:32:33+00:00 2026-06-08T08:32:33+00:00

At the moment this code applies the CSS style to the word once it

  • 0

At the moment this code applies the CSS style to the word once it is complete. I need it to apply the style to the individual letters to determine whether they are correctly placed or not.

$(".drop").droppable({
drop: function(event, ui) {
    word = $(this).data('word');

    guesses[word].push($(ui.draggable).attr('data-letter'));

    console.log(guesses);

    if (guesses[word].length == 3) {
        if (guesses[word].join('') == word) {
            $('td[data-word=' + word + ']').addClass("wordglow2").fadeOut(1300);


        } else {
            $('td[data-word=' + word + ']').addClass("wordglow");

        }
    }
}
}); 

The CSS is…

.wordglow {
    -webkit-box-shadow: inset 2px 2px 20px 7px #ff0000;
    box-shadow: inset 2px 2px 20px 7px #ff0000;

}

.wordglow2 {

    -webkit-box-shadow: inset 2px 2px 20px 7px #22ff22;
    box-shadow: inset 2px 2px 20px 7px #22ff22;

}

I have tried this but have had no joy…

$(".drop").droppable({
drop: function(event, ui) {
    word = $(this).data('word');

    guesses[word].push($(ui.draggable).attr('data-letter'));

    console.log(guesses);

    if (guesses[word].length == 3) {
        if (guesses[word].join('') == word) {
            $('td[data-letter=' + word + ']').addClass("wordglow2").fadeOut(1300);


        } else {
            $('td[data-letter=' + word + ']').addClass("wordglow");

        }
    }
}
});
  • 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-08T08:32:37+00:00Added an answer on June 8, 2026 at 8:32 am
    $(".drop").droppable({
    drop: function(event, ui) {
        word = $(this).data('word');
    
        guesses[word].push($(ui.draggable).attr('data-letter'));
        console.log($(event).toString().toSource());
        console.log($(ui.draggable).text());
    
        console.log('CHECKING : ' + $(this).text() + ' against ' + $(ui.draggable).text().trim());
    
    
        if ($(this).text() == $(ui.draggable).text().trim()) {
    
            $(this).addClass('wordglow3');
        } else {
            $(this).addClass('wordglow');
        }
        console.log('CHECKING : ' + $(this).text() + ' against ' + $(ui.draggable).text().trim());
    
    
        console.log(guesses);
    
        if (guesses[word].length == 3) {
            if (guesses[word].join('') == word) {
                $('td[data-word=' + word + ']').addClass("wordglow2");
    
            } else {
                $('td[data-word=' + word + ']').addClass("wordglow4");
    
            }
        }
    
    
    },
    
    activate: function(event, ui) {
        word = $(this).data('word');
    
        // try to remove the class
        $('td[data-word=' + word + ']').removeClass('wordglow').removeClass('wordglow4').removeClass('wordglow3');
    }
    
    
     });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need at this moment code look Css ul#content {height:1%;overflow:hidden;list-style:none;margin:0;padding:0;max-width: 1020px;} ul#content li{vertical-align:top;display:inline-block;margin:0 2%
At the moment I have this code which fires a projectile: Vector3 d =
Note: This code actually codes from a tutorial book I'm reading at the moment,
Take this example code (ignore it being horribly inefficient for the moment) let listToString
At the moment I have this code: @using (Html.BeginForm(Add, Review, Review)) { @Html.ValidationSummary(true) <fieldset>
At the moment I have this code: $rawsql = SELECT * FROM numbers n
At the moment I have this code: $divisions = explode(,, $mychecklist->dept); foreach($divisions as $division)
at the moment I use this code to disable submit button until all input
I have at the moment in this JsFiddle code snippet 3 tables, the central
Till this moment I used this method to invoke: public string AddText { set

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.