jquery-chosen

disable jquery-chosen dropdown

試著忘記壹切 提交于 2019-12-02 19:53:20
I have a select div that I'm using the chosen jquery plugin to style and add features to (most notably, search). The div looks something like this, <select data-placeholder="add a foobar" id="foobar" style="width: 350px;"> <option value=""></option> </select> And I'm using the chosen plugin like this, $('#foobar').chosen(); While some AJAX is loading, I'd like to disable the entire <select> div. Maybe with something like this, $('#foobar').disable() or this $('#foobar').prop('disabled', true) I think you get the idea. Any ideas on how to do this? I've tried a number of different things, like

Chosen.js styling not conforming to Bootstrap3 styles

亡梦爱人 提交于 2019-12-02 16:57:22
Im using chosen.js v1.0 and am using it in my project with Bootstrap 3 but the styles of my select boxes are not conforming to bootstrap 3 styles at all. Am I doing anything wrong? I simply invoked the select boxes using $('#select-input').chosen(); right? Actually, there is someone who created a Bootstrap 3.0 CSS theme for Chosen. Some screens: The theme is available in this Github issue Use Gist below. Edit I've created a Fiddle using the same HTML as the official Chosen documentation page with the Bootstrap theme applied. (added form-control to all selects and removed style="width:350px;" )

How to choose the text without selection in jquery chosen plugin

痞子三分冷 提交于 2019-12-02 16:26:59
问题 The below is my code my problem is i just want to implement like kendo i mean not with selection when user types the text and if we won't select the text it should be selected from drop down list as like in kendo In the below image you can see if you type medium and click mouse in sideways i mean without selecting with mouse it loads from drop down. $(function(){ $(".chosen-select").chosen(); }); <link rel="stylesheet" href="http://harvesthq.github.io/chosen/chosen.css"> <script src="https:/

How to set ASP.net dropdownlist index to 0 from the front-end

五迷三道 提交于 2019-12-02 14:03:53
I have the following code in ASP.net page: <asp:DropDownList ClientIDMode="Static" ID="ddl1" CssClass="chosen-select le" runat="server" AppendDataBoundItems="true"></asp:DropDownList> <asp:DropDownList ClientIDMode="Static" ID="ddl2" CssClass="chosen-select le" runat="server" AppendDataBoundItems="true"></asp:DropDownList> <asp:DropDownList ClientIDMode="Static" ID="ddl3" CssClass="chosen-select le" runat="server" AppendDataBoundItems="true"></asp:DropDownList> <input type="button" id="ClearForm" value="Clear" class="btn1" /> JQuery to set the index to 0 for all three dropdownlist: $(function

How to choose the text without selection in jquery chosen plugin

末鹿安然 提交于 2019-12-02 11:46:08
The below is my code my problem is i just want to implement like kendo i mean not with selection when user types the text and if we won't select the text it should be selected from drop down list as like in kendo In the below image you can see if you type medium and click mouse in sideways i mean without selecting with mouse it loads from drop down. $(function(){ $(".chosen-select").chosen(); }); <link rel="stylesheet" href="http://harvesthq.github.io/chosen/chosen.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script> <script src=

How to clear the select boxes [closed]

[亡魂溺海] 提交于 2019-12-02 10:32:57
I am hoping this will be a simple answer, I have used chosen drop downs for filtering the records. I have added another button for reseting the filter values. I want to clear the chosen drop down on the "Reset" click. I did try changing the selected values, but no luck. Any pointers? Finally got answer to my question, it was asked in the GitHub for Choosen plugin. Here is the code that works like charm:- $('.dropdownclass option:selected').removeAttr('selected'); $('.dropdownclass').trigger('chosen:updated'); Hope this helps.. your answer: $(".category-filter").val("") Should work if its got

Chosen : jQuery plugin…does not work after postback in asp.net

浪尽此生 提交于 2019-12-02 03:52:50
i am using http://harvesthq.github.io/chosen/ control in drop-down list . Everything is going good but i am facing a problem like if i am setting the property of drop-downlist i.e AutoPostBack="true" ,after selecting one item the control lossing its property and converting to normal drop-down list Can anyone have any idea about this? Please suggest me. Thanks If you are binding plugins in $(document).ready(); , then add this code and check. $(document).ready(function(){ //Binding Code Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); function EndRequestHandler

Different display value for selecte text using select2.js

醉酒当歌 提交于 2019-12-01 17:51:50
Trying to implement a custom select dropdown using select2 plugin Is it possible to have the selected value to display only the actual option 'value' instead of the text, so if I selected 'Australian Dollar', the selected text should only display 'AUD' My mark-up looks something like this: <select name="convert-to" id="convert-to"> <option value="AUD" data-currency="AUD">Australian Dollar</option> <option value="USD" selected="selected">US Dollar</option> <option value="JPY">Japanese Yen</option> <option value="EUR">Euro</option> <option value="GBP">British Pound</option> <option value="CAD"

Different display value for selecte text using select2.js

醉酒当歌 提交于 2019-12-01 17:48:19
问题 Trying to implement a custom select dropdown using select2 plugin Is it possible to have the selected value to display only the actual option 'value' instead of the text, so if I selected 'Australian Dollar', the selected text should only display 'AUD' My mark-up looks something like this: <select name="convert-to" id="convert-to"> <option value="AUD" data-currency="AUD">Australian Dollar</option> <option value="USD" selected="selected">US Dollar</option> <option value="JPY">Japanese Yen<

Knockout - is it possible to combine standard select bindings with a custom binding?

耗尽温柔 提交于 2019-12-01 11:24:41
This does NOT work (custom binding is called but dropdown is empty) <select id="parentArea" class="chosen-select" data-bind=" chosen:{}, options: parentAreas, optionsCaption: 'Choose...', optionsText: 'Label', value: selectedParentArea"> </select> But this works (dropdown is filled) <select id="parentArea" class="chosen-select" data-bind=" options: parentAreas, optionsCaption: 'Choose...', optionsText: 'Label', value: selectedParentArea"> </select> I would like to add a custom binding to the dropdown but not sure how to do it. Custom binding is simple ko.bindingHandlers.chosen = { init: