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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:06:55+00:00 2026-05-29T11:06:55+00:00

I was looking at the js plugin of bootstrap,namely bootstrap-typeahead.js.I can’t figure out how

  • 0

I was looking at the js plugin of bootstrap,namely bootstrap-typeahead.js.I can’t figure out how element is selected.

$('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) 

I know element is actually selected by the data-provide part,but when I look through jquery.js , I can’t figure out how it is done.From .on() part I went to event.add() part then I became more confused.Can anyone tell me how that’s done?

I know what it does,but want to know how.How element is selected?
I need more ideas 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-29T11:06:56+00:00Added an answer on May 29, 2026 at 11:06 am

    The first argument of the on() method is the event, in this case it is namespaced – the event is focus in the typeahead.data-api namespace

    The second argument is a filter-selector for event-delegation purposes. The actual event handler is attached to the body element, but the handler function is only executed for events coming from elements with the data-provide attribute with a value of typeahead

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

Sidebar

Related Questions

I am looking for a jQuery plugin which can serve me the floating share
I'm looking for a Vim plugin that can do these kind of thing. Let's
I'm looking for a plugin or a code that can let me customize the
I am looking for a plugin that displays something like tooltip that I can
I'm looking for a plugin for jQuery that can validate as a key is
I'm looking for a plugin that makes you get out of parenthesis/brackets/quotes/etc when you're
I am looking for eclipse plugin or a open source free tool that can
I'm looking for a plugin, preferably jQuery, that I can have the content hidden
I'm looking for jquery plugin that can switch content with buttons. e.g. In the
I have looking for a plugin tried out many the only plugin i found

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.