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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:10:20+00:00 2026-05-25T17:10:20+00:00

Please see my example here: LIVE EXAMPLE * As you can notice, the focused

  • 0

Please see my example here: LIVE EXAMPLE

*As you can notice, the focused on input is not the first empty one. What is wrong? *

jQuery Code:

$(document).ready(function() {

$('.quick div input, .quick div textarea').live('focus', function() {
    var a = $(this).attr('id');
    var b = 'submit';

    $('.quick .focus').removeClass('focus');
    if (a == b) {
        return false;
    } else {
        $(this).parent().addClass('focus');
    }
});


  $('input:text[value=""]').focus(); // problematic line

});
  • 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-25T17:10:21+00:00Added an answer on May 25, 2026 at 5:10 pm

    You have to use :first. As you are not using :first, it is going through every <input type="text" value="".. and it is stopping at the at last one. Code below will work for you

     $('input:text[value=""]:first').focus();
    

    Working demo http://jsfiddle.net/usmanhalalit/Y8d4f/34/

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

Sidebar

Related Questions

Please see my script here: LIVE EXAMPLE There is a unintelligible behavior which I
everyone. Please see example below. I'd like to supply a string to 'schedule_action' method
Please see here for a related question . However, char goes to 0xffff (or
Please see an example of my code below: CODE UPDATED public class ScrollableCheckboxList {
(For a quick recap please see sections titled , DATA. Can only get results
Please see my answer to this question below. It is based upon Kevin's input,
I had to take my working example here. For some reason, it does not
I've simplified my example here massively, so please excuse it if it looks to
Please see code below. The destructors are never called. Anyone know why and how
Please see this piece of code: #include<stdio.h> #include<string.h> #include<stdlib.h> int main() { int i

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.