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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:40:29+00:00 2026-06-02T02:40:29+00:00

var $inputs = $(‘.add-item-form :input’); This gets all the input fields but also picks

  • 0
var $inputs = $('.add-item-form :input');

This gets all the input fields but also picks up the select fields which I do not want.

e.g.

<select><option>example</option></select>
  • 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-02T02:40:30+00:00Added an answer on June 2, 2026 at 2:40 am

    :input is a jQuery-specific pseudo-selector for input, textarea, button, and select elements. So you could do this:

    var $inputs = $('.add-item-form :input:not(select)');
    

    …but you can also just call out specifically what you want:

    var $inputs = $('.add-item-form input, .add-item-form textarea, .add-item-form button');
    

    …which would have the advantage that if the browser supports querySelectorAll (and nearly all do, in standards mode), jQuery can just hand off to native handling (whereas :input is specific to jQuery, so can’t be handled by the browser’s native stuff).

    Or, of course, if you don’t want textarea and button elements, it’s really simple:

    var $inputs = $('.add-item-form input');
    

    …and again that has the advantage of being handled by the browser’s optimized stuff where possible.

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

Sidebar

Related Questions

function getInputElements() { var inputs = document.getElementsByTagName(input); } The above code gets all the
I have this variable: var _inputs = document.getElementsByTagName('input'); But I want to make a
If I do this: var inputs = $('input[name=ch_attachments[featured][]]'); How do I find inputs that
I am using an ajax call which is as follows var ID=$(this).attr('id'); var input=$(#input_+ID).val();
var brands = document.getElementsByName(brand); for(var brand in brands){ $(input[name='brand']).eq(brand).click(function(){ alert(hello22); loadDataFN(1); }); } This
i have an input on my webapp like this: var t = '2012-03-27T23:30:00Z'; What
On client I create some inputs, for example: var title = document.createElement('input'); title.setAttribute('type', 'text');
I have the followng code: var inputs = document.getElementsByTagName(input); for (var i = 0;
I'm using this jQuery function to jumping on input styled components of the form:
I have a form object in jquery, and I'd like to select all inputs

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.