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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:39:51+00:00 2026-06-16T01:39:51+00:00

Page is loaded with a hidden select box in it. I click on a

  • 0
  1. Page is loaded with a hidden select box in it.
  2. I click on a button
  3. I append elements to this select box, I move it and I make it visible
  4. I apply plugin Chosen on it

This is done by this function

function moveHiddenSelect(idOffline, type, idMedia, mediaName){
    var $selToReplace  = $("#"+type+"_"+idOffline);
    var $selOriginal   = $("#originalSelect");
    $selToReplace.replaceWith($selOriginal);

    $.getScript('/lib/chosen/chosen.jquery.min.js', function(){
        $selOriginal.chosen(); //load plugin script and apply it on the select box
    });

    $selOriginal.css("width", "220px");
    $selOriginal.css("visibility", "visible");
}

No problem when I click the button one time, but when I click again on the button (step 2) nothing is happend..

  • 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-16T01:39:52+00:00Added an answer on June 16, 2026 at 1:39 am

    The chosen() should be called once, just for creation.
    After updating the values of each dropdown, you could use: $(DropdoenElement).trigger(“liszt:updated”);

    function moveHiddenSelect(idOffline, type, idMedia, mediaName){
        var $selToReplace  = $("#"+type+"_"+idOffline);
        var $selOriginal   = $("#originalSelect");
        $selToReplace.replaceWith($selOriginal);
    
        selOriginal.chosen(); // Init the plugin
    
        $.getScript('/lib/chosen/chosen.jquery.min.js', function(){
           //load plugin script and apply it on the select box
           selOriginal.trigger("liszt:updated")
        });
    
        $selOriginal.css("width", "220px");
        $selOriginal.css("visibility", "visible");
    }
    

    Hope it helps!

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

Sidebar

Related Questions

I have content loaded into a hidden iframe on a page and I'm wanting
Why when I click a link in the page loaded in the WebView in
I want to stop click on any links until the page is loaded. Can
I need a plugin for mootools like this . It's just a simple button
I want an image to be hidden when page just loaded. I can call
I have a like button that is loaded from ajax on to my page.
Is it possible that the html page loaded, cannot be refreshed or reloaded by
I'm loading Disqus on a page loaded via HTTPS with the following code, as
I have a page being loaded in an <iframe> . Inside the <iframe> ,
I have a uiwebview that sends its loaded page url to a uitableview to

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.