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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:03:28+00:00 2026-05-30T14:03:28+00:00

I am trying to use blur on td,p without any success. jQuery documentation says

  • 0

I am trying to use blur on td,p without any success. jQuery documentation says that

"Originally, this event was only applicable to form elements, such as
input. In recent browsers, the domain of the event has been extended
to include all element types."

So it should fire on p/td tags.
Here is my sample code:

<p>Test 2
</p>
<p>Test 1
</p>
<script>
    $(document).ready(function () {
        $("p").blur(function () {
            alert('blur');
        });
        
    });
</script>

Note however that if I try to invoke blur programatically it is firing.

$("p").blur();

I am assuming that when I click on the first p and then click anywhere else the blur should fire…
Am I missing something here?

  • 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-30T14:03:29+00:00Added an answer on May 30, 2026 at 2:03 pm

    Blur is the opposite event of a focus event. A p tag cannot be focused unless it has a tabindex set so your p tags won’t blur.

    Add the tabindex attribute to your p tags and a blur will be fired after tabbing or clicking e.g.

    <p tabindex="10">test 1</p>
    <p tabindex="11">test 2</p>
    

    focusout event: http://jsfiddle.net/b98Bs/

    blur event: http://jsfiddle.net/b98Bs/1/

    (If you click the p, remember to click away from it after to fire the event)

    UPDATE:

    I have included a second jsfiddle to show that blur, as well as focusout, events also fire with an alert displaying the text of the p element that is losing focus.

    If you want the tabindex to follow the order of the elements in the document, set them both to tabindex=”0″: http://jsfiddle.net/b98Bs/2/

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

Sidebar

Related Questions

I'm trying to use Firebug to debug some Javascript that entails blur and focus
I am trying to use the jQuery plugin: Floating boxes with easing and motion-blur
I am need paint my image. I'm trying use JQuery in here this link:
I am trying use the jQuery table sorter plugin for a table that is
I'm trying to use the Accelerate framework on iOS to bypass the fact that
I'm trying to use JQuery to check upon submission if a field input has
I am trying to use the jQuery UI 1.9 spinner for the quantity field
i'm trying use webview to load a image from sdcard i use this path
I am trying use a from a multi-dimensional array that I create in another
I'm trying to use the numberformatter plugin for jQuery. It works, but I don't

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.