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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:20:07+00:00 2026-06-13T17:20:07+00:00

I am using chosen jquery plugin for my select input. I want to reset

  • 0

I am using chosen jquery plugin for my select input. I want to reset select option on click on a tag so doing so I want to access jquery plugin function. DEMO

HTML

<select id="second" class="chzn-select" style="width:100px">
<option value="0"> select</option>
<option value="1"> mr</option>
<option value="2"> mrs</option>
</select>
<a href="#">reset</a>​

jquery

$(".chzn-select").chosen()
$('a').click(function(){
    $.chosen({results_reset})
})

​
function from plugin

Chosen.prototype.results_reset = function () {
    this.form_field.options[0].selected = true;
    this.selected_item.find("span").text(this.default_text);

    if (!this.is_multiple) this.selected_item.addClass("chzn-default");

    this.show_search_field_default();
    this.results_reset_cleanup();
    this.form_field_jq.trigger("change");

    if (this.active_field) return this.results_hide();
};

Here is the link for complete plugin
http://harvesthq.github.com/chosen/chosen/chosen.jquery.js

  • 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-13T17:20:11+00:00Added an answer on June 13, 2026 at 5:20 pm

    Edit

    To call a plugin function, you can do:

    $('your-select').data('chosen').results_reset();
    

    Demo: http://jsfiddle.net/vCE4Y/12/


    You do not need to access plugin code to reset the select. You can reset it as follows:

    $('your-select').val(0).trigger("liszt:updated");
    

    Demo: http://jsfiddle.net/vCE4Y/11/

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

Sidebar

Related Questions

Hi I am using jquery chosen plugin. I want to selected menu value by
I'm using jQuery Chosen on my page and I want to run a function
I'm using an jquery plugin called Chosen. I see it has a search option
Possible Duplicate: jQuery Chosen reset I'm using Chosen plugin on my project. http://jsfiddle.net/tt13/gFzzc/ The
I'm using the chosen.js plugin http://harvesthq.github.com/chosen/ with jQuery to allow the user to select
So I'm using the pretty nice jQuery plugin, Chosen; http://harvesthq.github.com/chosen/ What I'm doing is
I'm using Chosen JQuery Plugin for a ASP.NET MVC (Razor) Project. For a Dropdownlist
I'm in the process of using jQuery Chosen for 2 <select> elements. Each element
I am trying to validate html select element using jQuery Validate plugin. I set
Let's say I want to create a search form & using chosen jQuery multiple

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.