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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:47:20+00:00 2026-05-27T04:47:20+00:00

I am using the jQuery plugin chosen (by Harvest). It is working fine on

  • 0

I am using the jQuery plugin chosen (by Harvest). It is working fine on (document).ready, but I have a button that, when clicked, uses ajax to dynamically create more select objects that I want to use the “chosen” feature. However, only the original select elements have the “chosen” features, and the new (dynamically created) do not work. I am using jQuery.get to append the new elements. Here is a sample of the code:

jQuery(".select").chosen();//this one loads correctly
jQuery("#add-stage").click(function() {
    jQuery.get('/myurl',{},function(response) {
            //response contains html with 2 more select elements with 'select' class
            jQuery('#stages').append(response);
        jQuery(".select").chosen();//this one doesn't seem to do anything :-(
    });
});

I was thinking that I need a .live() function somewhere, but I haven’t been able to figure that out yet. Any help is much appreciated!

Note – I am not trying to dynamically load new options, as specified in the documentation using trigger("liszt:updated");

  • 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-27T04:47:21+00:00Added an answer on May 27, 2026 at 4:47 am

    Ensure that the response elements have the select class.

    console.log( response );  // to verify
    

    May also be a good idea to only apply the plugin to the new element(s).

    jQuery(".select").chosen();
    
    jQuery("#add-stage").click(function() {
        jQuery.get('/myurl',{},function(response) {
            console.log( response ); // verify the response
    
            var $response = $(response);  // create the elements
    
            $response.filter('.select').chosen(); // apply to top level elems
            $response.find('.select').chosen();   // apply to nested elems
            $response.appendTo('#stages');
        });
    });
    

    Also, if /myurl is returning an entire HTML document, you may get unpredictable results.

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

Sidebar

Related Questions

I was using Jquery Numeric plugin but I found that is not working on
i m using jQuery tablsorter plugin, it's working perfect,but now problem is ... i
I have been using jquery validate plugin http://bassistance.de/jquery-plugins/jquery-plugin-validation/ . It has been working successfully,
I am using jquery validation plugin for form validation. I have added a custom
I am using Jquery Cycle Plugin and it has a side panel that highlights
I am using a jquery plugin from [ FilamentGroup ] called DateRangePicker. I have
I am using jquery validation plugin to validate my form. I have one field
I have a multi-level mega menu on my site (using jquery plugin), however, when
I am using jquery plugin datatables and the css demo_table.css that has been using
I have a problem , i'm using jQuery plugin from http://www.stilbuero.de/jquery/tabs/ , plugin for

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.