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

  • Home
  • SEARCH
  • 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 8909057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:20:25+00:00 2026-06-15T03:20:25+00:00

The task is to take action if the focus is not found on any

  • 0

The task is to take action if the focus is not found on any td in a table. The table layout is stored in a jquery variable, whose layout looks like this

<table class="cal_tbl" cellSpacing="1" cellPadding="3">  <tbody>
<tr>
  <td class="cal_head">&lt;&lt;</td>
  <td class="cal_head">&lt;</td>
  <td class="cal_head" colSpan="3">November 2012</td>
  <td class="cal_head">&gt;</td>
  <td class="cal_head">&gt;&gt;</td>
</tr>
<tr>
  <td class="cal_subhead">Sun</td>
  <td class="cal_subhead">Mon</td>
  <td class="cal_subhead">Tue</td>
  <td class="cal_subhead">Wed</td>
  <td class="cal_subhead">Thu</td>
  <td class="cal_subhead">Fri</td>
  <td class="cal_subhead">Sat</td>
</tr>
<tr>
  <td colSpan="4"></td>
  <td class="cal_cell">1</td>
  <td class="cal_cell">2</td>
  <td class="cal_cell">3</td>
</tr>
<tr>
  <td class="cal_cell">4</td>
  <td class="cal_cell">5</td>
  <td class="cal_cell">6</td>
  <td class="cal_cell">7</td>
  <td class="cal_cell">8</td>
  <td class="cal_cell">9</td>
  <td class="cal_cell">10</td>
</tr>
<tr>
  <td class="cal_cell">25</td>
  <td class="cal_cell">26</td>
  <td class="cal_cell">27</td>
  <td class="cal_cell">28</td>
  <td class="cal_cell">29</td>
  <td class="cal_cell">30</td>
</tr>  </tbody></table>

I have to check whether the focus is on any of the td
The below is my code what I tried

if ($(CurrentCalendarButton).children[i].is(":focus") == true)
     alert("Keep it on")
  • 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-15T03:20:26+00:00Added an answer on June 15, 2026 at 3:20 am

    The problem is that all not elements on the DOM actually accept focus, and it’s up to the browser to decide which ones do. See Which HTML elements can receive focus?

    Maybe have a hover event on your td:

    var hasFocus = false;
    $('td').hover(
        function () { hasFocus = true;  alert('has focus  !');},
        function () { hasFocus = false; alert('lost focus !');}
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What would it take to create a TASK card board with mappable states like
I am experimenting with this code: foreach (var r in _vm.Rules.Take(20)) { Task.Factory.StartNew(() =>
This should be an absurdly easy task: I want to take each line of
I have a task to do, I need to take data that has been
I have a task I need to perform, do_stuff(opts) , that will take ~1s
When doing a webrequest, or any other long running task, I should do it
I'm trying to do a very simple task: take a unicode-aware wstring and convert
I am trying to spawn a thread to take care of DoWork task that
Please go easy on me. I was just given the task to take a
Generally speaking, any ant task which accepts a <mapper> will also accept several tags

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.