jquery-chosen

Passing chosen multi select values to controller action

前提是你 提交于 2019-12-21 16:22:44
问题 I'm trying to send the selected values of a chosen multi select list to an Action in my Controller. I've verified val() does show me an array of selected values like ["33","175"] when I print out to the console but the Action's argument is always null. I tried changing the argument type to object and verified it's not null but I can't parse the values. Any suggestions? Please and thanks! Ajax call: $(".chosen-select").on("change", function (event, params) { console.log($(".chosen-select").val

Passing chosen multi select values to controller action

断了今生、忘了曾经 提交于 2019-12-21 16:22:38
问题 I'm trying to send the selected values of a chosen multi select list to an Action in my Controller. I've verified val() does show me an array of selected values like ["33","175"] when I print out to the console but the Action's argument is always null. I tried changing the argument type to object and verified it's not null but I can't parse the values. Any suggestions? Please and thanks! Ajax call: $(".chosen-select").on("change", function (event, params) { console.log($(".chosen-select").val

Binding event to chosen select

余生颓废 提交于 2019-12-21 07:00:40
问题 I have this code for a select box which is being displayed by the Chosen jQuery plugin. What I am trying to achieve is to get the value from the current item that has been selected: <div> <select id="schedule_event" name="schedule[event]" style="display: none; " class="chzn-done"><option value="Game" selected="selected">Game</option> <option value="Event">Event</option> <option value="Training">Training</option> </select> <div id="schedule_event_chzn" class="chzn-container chzn-container

Chosen jQuery plugin : get multiple select values in the order they were clicked

允我心安 提交于 2019-12-21 04:38:11
问题 I use Chosen jQuery plugin on a multiple select element. I want to retrieve and to display the options value in the order they were selected (clicked). For example, if I click on "Three", "Two" then "One", I should get the values in this order: [3, 2, 1] I use the 'change' event of Chosen but it gives me the values ordered as they are declared in the DOM. i.e.: [1, 2, 3] Here is my code snippet: <select class="chosen" data-order="true" name="multiselect[]" id="multiselect" multiple="true">

Chosen jQuery widget doesn't work in Compatibility View of IE8

久未见 提交于 2019-12-21 04:20:36
问题 I'm using the Chosen jQuery widget from http://harvesthq.github.com/chosen/. It works well in my application in most browsers but it will not work in IE8 under 'Compatibility View'. This presents a problem for me because on my company's intranet Compatibility View is default for intranet sites. You can test my issue by going to the link above and switching to Compatibility View in IE. The reason I haven't completely given up on it is because on this page http://davidwalsh.name/dw-content

Chosen.js styling not conforming to Bootstrap3 styles

耗尽温柔 提交于 2019-12-20 08:39:46
问题 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? 回答1: 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

How to clear the select boxes [closed]

旧巷老猫 提交于 2019-12-20 07:04:23
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . 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? 回答1: Finally got answer to

Chosen jQuery Plugin Is Returning 'Null'

与世无争的帅哥 提交于 2019-12-20 04:22:19
问题 I am using Chosen for jQuery and the folder field is returning null, however when I look at the source of the page, the values are given. I can't figure out what I am doing wrong, my code is below: For The HTML: <!doctype html> <html><head> <meta name="viewport" content="width = 1300"> <meta charset="UTF-8"> <title>Back Office | Home</title> <link rel="stylesheet" type="text/css" href="../Style Sheets/styles.css"/> <link rel="stylesheet" type="text/css" href="../chosen/chosen.css"> <script

Chosen.js and validate jquery

别说谁变了你拦得住时间么 提交于 2019-12-18 12:19:14
问题 I am using validate.jquery.js : works fine. But when I'm adding chosen.js , validation on the select dropdowns doesn't work anymore. Here is the JS I'm using http://pastebin.com/S9AaxdEN And here is my select form : <select name="category" id="category" placeholder="" class="{validate:{required:true}}"> <option value=""><?php echo lang('category_choice'); ?></option> <option value="vtt">VTT</option> <option value="autre">Autre type de vélo</option> </select> Don't know why chosen.js disable

'select all' and 'remove all' with chosen.js

我们两清 提交于 2019-12-18 10:57:05
问题 For the select menu plugin chosen.js, is there an established way to add 'select all items in list' or 'remove all items in list' feature to a multiple select input? In the main branch or perhaps in one of the forks? Or has someone done this before has some tips? 回答1: It should be pretty straight forward, just do it the "normal" way first: $('.my-select-all').click(function(){ $('#my_select option').prop('selected', true); // Selects all options }); Then trigger the liszt:updated event to