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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:32:47+00:00 2026-06-17T08:32:47+00:00

I am using the jQuery plugin searchabledropdown , which essentially transforms a <select> selection

  • 0

I am using the jQuery plugin searchabledropdown, which essentially transforms a <select> selection element into an input field where results are displayed as you type (it still looks and behaves like a dropdown select though!).

Now I’d like to pass focus to such a transformed element. What I did:

  • I looked up said elements in the Chrome web tools,
  • then wrote a matching jQuery selector,
  • finally called focus() on it.

My code seems to work for other elements (tried it with a not transformed, regular <select> element, where it worked fine).

jQuery(".map-searchbox input").focus();

Giving focus to the input element which was created by searchabledropdown does not work however… Here is the outline of the html elements after transformation. (Sorry for all the style garbage, but I was not sure if it might be important…)

<div class="map-hudbox map-searchbox">
  <select class="searchselect" style="text-decoration: none; width: 163px; height: 19px;">
    <option value="...">...</option>
    ...
  </select> 
  <input type="text" style="height: 17px; position: absolute; top: 0px; left: 0px; margin: 0px; padding: 2px 0px 0px 3px; outline-style: none; border-style: solid solid none; border-color: transparent; background-color: transparent; border-left-width: 1px; border-top-width: 1px; font-size: 12px; font-variant: normal; font-weight: normal; color: rgb(68, 68, 68); text-align: -webkit-auto; text-indent: 0px; text-shadow: none; text-transform: none; width: 140px; z-index: 2;">
  <div style="position: absolute; top: 0px; left: 0px; width: 165px; height: 19px; background-color: rgb(255, 255, 255); opacity: 0.01; z-index: 1;"></div>
</div>

The input and the bottom div elements are the ones created from the select at the top by the searchabledropdown plugin. And the input field is what I would like the focus to be given to.

Any ideas why the normal .focus() call does not help?

Help would be much appreciated! 🙂


P.S. To obviate the usual suggestion to check the jQuery selector: the selector works, and if printed out via the Chrome JS console shows me exactly the input element listed above.

  • 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-17T08:32:48+00:00Added an answer on June 17, 2026 at 8:32 am

    Gave it an other go a while a go.

    I realized the problem was one of visibility. The searchabledropdown plugin was changing visibilities on input and select elements, and giving focus to invisible elements obviously didn’t work.

    After figuring out what to make visible when the above mentioned jQuery(".map-searchbox input").focus(); worked like a charm.

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

Sidebar

Related Questions

im using fullcalendar jquery plugin in my web. i have a problem in which
Hi I am Using jquery UI autocomplete plugin for zipcode field. jQuery UI autocomplete
I'm using jQuery Validate Plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ Simple demo: <input type=text name=email class=required email />
I am using jQuery validation plugin ( http://bassistance.de/jquery-plugins/jquery-plugin-validation/ ) I have following structure: <select
I'm using Jquery plugin ZClip or ZeroClipboard which copies content to the clipboard via
I'm using Jquery Autocomplete based on: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ . I am able to select a
I wish I can make an image gallery without using jQuery plugin. Which all
am using jquery tablesorter plugin and in my country column i got special characters
I am using the JQuery plugin twosidedmultiselect http://www.stevefenton.co.uk/cmsfiles/assets/File/twosidedmultiselect.html and then once options are placed
I'm using this jquery plugin to build forms. In order to allow the modification

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.