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

  • Home
  • SEARCH
  • 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 6789169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:34:17+00:00 2026-05-26T17:34:17+00:00

Part 1: I want the .highlight() function to be active only when the input

  • 0

Part 1: I want the .highlight() function to be active only when the input length is larger than 3. After 3 characters, I want every keystroke to look for this value and apply the .highlight() function (which works fine when using a static value). I am using it as a find in page function.

So here’s what I have tried, but without success:

<script type="text/javascript">

$(document).ready(function() {
  if($("#search_doc_input").length > 3) {
    $('#search_doc_input').keydown(function() {
      $(body).highlight($(this).val()); 
    });
  }
});

</script>

Part 2: Also, what would be the best way, once the highlight function is active for a certain value, to scroll to the first instance of the new <span class="highlight"> added (which is what the .highlight() function does)?

  • 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-26T17:34:18+00:00Added an answer on May 26, 2026 at 5:34 pm

    Fiddle example:

    http://jsfiddle.net/uZVGb/1/

    Updated:

    http://jsfiddle.net/8aM2d/1/

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

Sidebar

Related Questions

I want to put an image on a button, but I want part of
I want to use part of the output of a command run from the
I want to delete part of a record. For example, a column called message
I want to implement a simple 2 part FormWizard. Form 1 will by dynamically
I want to test my part of code that returns the users password question.
I want to match and modify part of a string if following conditions are
I want to include some dynamic part in the filename of the msi file
I want to move a part, i.e. one subdirectory of an existing, private mercurial
I want to redefine the \part* command so that it automatically adds a contents
I want to get a part of picture in a PictureBox by allowing the

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.