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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:01:52+00:00 2026-05-25T13:01:52+00:00

After search and click on result search and click on plus(button add input) next

  • 0

After search and click on result search and click on plus(button add input) next to input “INSERT VALUE HERE” in the example, in new input $('.auto_complete').keyup(function () { ... not work.

I believe that have to bind the events separately and use a closure so that each element has its own set of variables(or change the logic so that only use the value in the field and don’t need any state variables),

how is it?

EXAMPLE: see here

Js full code: http://jsfiddle.net/6yPxn/

$.each:

var ac = $(this).text();
var ok = $.grep(data, function (e) {
    return e.name == ac;
})[0].units;
$.each(ok, function (bu, key) {
    //alert(key.name_units);
    $("<div class='mediumCell'/>").hide().fadeIn('slow').append('<b>' + key.name_units + '</b>', $('<div class="column" style="float: left;" />')).appendTo(".list_units");
});
  • 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-25T13:01:52+00:00Added an answer on May 25, 2026 at 1:01 pm

    It runs fine, but I don’t see anywhere in that code you’ve provided where you’re adding an event handler to the input box.

    The issue is in http://www.binboy.gigfa.com/files/js/admin.js, somewhere around the top:

    $('.auto_complete').bind('keyup',function () {
     /* ... */
    });
    

    When the page loads it binds several event handlers to input boxes and the like. When you create a new one this functionality is not added unless you’re using jQuery’s .live or something similar. As the documentation notes:

    This method [.live()] is a variation on the basic .bind() method for attaching event handlers to elements. When .bind() is called, the elements that the jQuery object refers to get the handler attached; elements that get introduced later do not, so they would require another .bind() call.

    I don’t really want to wade through all the nested click and delegate and bind calls, but I guarantee you that’s where your problem lies. To fix it you’ll probably need to have either the autocomplete section run on your newly created node, use .live instead, or just .clone the original.

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

Sidebar

Related Questions

why after search and click on result search and click on plus(button add input)
In following code $('body').delegate('.submit',... passed = search && passed; ... after click on button
so here's the problem I have one form, it outputs search results after submit,
A google search gives me the following first result on HTML: <h3 class=r><a href=https://rads.stackoverflow.com/amzn/click/com/0470284889
The work flow: user click the button, a dialog box opens with a search
why my code have this error, after click on button submit and click on
I have a webpage with search form fields and on click of submit button,
In my Drupal 7 site, users will fill a form. After some search i
After a painful search for Python XMPP library to use for XEP 060 I
After an extensive search I have been unable to find any information on this

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.