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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:20:30+00:00 2026-05-22T02:20:30+00:00

Bottom line: I’d like to disable (with jQuery) certain elements from being able to

  • 0

Bottom line: I’d like to disable (with jQuery) certain elements from being able to take focus, as opposed to removing focus that’s already applied. My issue may be IE-8 specific, so I’ll consider IE-8 focussed solutions.

For example, I have a months-nav for which sometimes some months may not be valid selections, but I want to still present the month. Rather than cluttering my server-side logic and complicating my markup by switching to a span instead of a link for the invalid month, I’m just adding an “invalid” class to the li (link container)

<li class="valid">
    <a href="/subpubs/yearMonth/2011-1">Jan</a>
</li>       

<li class="invalid">
    <a href="/subpubs/yearMonth/2011-2">Feb</a>
</li>

[etc.]

This jQuery works to turn off the link and remove focus:

$('.invalid  > a').click(function () { $(this).blur(); return false; });

But in IE8 (though not IE7, don’t know about IE9), the removal of focus by .blur() has enough of a delay that there’s a visible blink (even with lonesomeday’s solution). So I’d like another approach, or perhaps just a fix for IE8.

Is there away to just disable the link from being able to take focus at all?

  • 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-05-22T02:20:31+00:00Added an answer on May 22, 2026 at 2:20 am

    You could consider switching all the invalid links to span markup using jQuery; this would be client-side rather than server-side. Is there a particular reason for removing the focus from these links? If they don’t actually link to anything useful surely this is a case where server-side you should be replacing the links with just text?

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

Sidebar

Related Questions

i need a textbox with a bottom-line such like inputfields used in forms. I
There is a way to keep the scroll on bottom for a multi line
Per the example array at the very bottom, i want to be able to
You can skip to the bottom line if you don't care about the background:
According to this article: http://subsonicproject.com/docs/3.0_Migrations Bottom line: if you're a developer that is concerned
A description of the problem follows. You can skip to the bottom line if
Bottom up or top down? First I used top down but I felt to
Fixed: See notes at bottom I am implementing a generic class that supports two
Several extensions offer a bottom window for viewing their content. Firebug and ScribeFire are
Notice in the bottom right hand corner of this page it has the SVN

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.