jquery-chosen

how to make chosen select go over parent div

早过忘川 提交于 2019-12-01 09:08:35
I created a jsFiddle which shows the chosen-select control being 'truncated' by it's parent div . And even though the overflow is set to hidden for the y-axis, it's showing the scroll bar anyway when clicking on the chosen-select control. The height of this parent div is fixed and set to 200px , and needs to remain this way. How can I make chosen-select go over the parent div when clicked upon? EDIT: jsFiddle updated with more CSS . If I comment the div.content , it doesn't mess up the layout. The chosen-select control is now on top of the 4th header. In this fiddle I can still select the

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

99封情书 提交于 2019-12-01 07:51:48
问题 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

how to make chosen select go over parent div

走远了吗. 提交于 2019-12-01 06:37:36
问题 I created a jsFiddle which shows the chosen-select control being 'truncated' by it's parent div . And even though the overflow is set to hidden for the y-axis, it's showing the scroll bar anyway when clicking on the chosen-select control. The height of this parent div is fixed and set to 200px , and needs to remain this way. How can I make chosen-select go over the parent div when clicked upon? EDIT: jsFiddle updated with more CSS . If I comment the div.content , it doesn't mess up the layout

How to hide or remove options from jQuery Chosen select dropdown

微笑、不失礼 提交于 2019-12-01 03:48:12
I would like to hide certain elements from a dropdown that is created using the Chosen plugin. I have tried removing it: $( 'option:contains("Swatch 1")').remove().trigger("chosen:updated"); and just hiding it: $( '.chosen-results li:contains("Swatch 1")').css('display,'none'); But neither works. See Colours dropdown: http://www.carolineelisa.com/test/wordpress/product/machine/ Any help appreciated :) In the original select you need to hide the option. For example: $('select.chosen-select options:contains("Swatch 1")'); Then update the chosen options with: $('select.chosen-select').trigger(

How to hide or remove options from jQuery Chosen select dropdown

冷暖自知 提交于 2019-12-01 00:52:27
问题 I would like to hide certain elements from a dropdown that is created using the Chosen plugin. I have tried removing it: $( 'option:contains("Swatch 1")').remove().trigger("chosen:updated"); and just hiding it: $( '.chosen-results li:contains("Swatch 1")').css('display,'none'); But neither works. See Colours dropdown: http://www.carolineelisa.com/test/wordpress/product/machine/ Any help appreciated :) 回答1: In the original select you need to hide the option. For example: $('select.chosen

Ember.js Chosen integration

Deadly 提交于 2019-11-30 21:27:14
I've done a sample Ember.js integration with Chosen (https://github.com/harvesthq/chosen) Coffeescript: App.ChosenSelectView = Em.Select.extend({ didInsertElement: -> @_super() @$().chosen() # Assumes optionLabelPath is something like "content.name" @addObserver(@get("optionLabelPath").replace(/^content/, "content.@each"), -> @contentDidChange()) contentDidChange: -> # 2 ticks until DOM update Em.run.next(this, (-> Em.run.next(this, (-> @$().trigger("liszt:updated"))))) }) The thing that bothers me is I don't have a good idea about how much time do I need before triggering update on the Chosen

Add values to a chosen multiselect

試著忘記壹切 提交于 2019-11-30 19:45:03
问题 I am wondering whether it's possible to add new values on the fly to a chosen.js multiselect (similar to how tagging works). I've seen in another SO post a user saying this is possible. He links to an example and a fork on github, but I've had some difficulties implementing those. The source code is written in CoffeeScript. I've tried compiling it (using an online compiler) to regular JavaScript, copy pasted the code into a blank test project but I got errors. After that, I've loaded The

Chosen dropdown within Bootstrap modal is hidden behind modal footer

百般思念 提交于 2019-11-30 18:28:53
I am using a modal based on the example from twitter bootstrap. I have a select element that uses chosen. When the chosen select drops down, it is cut off by the modal footer. I tried to add the z-index value on the chosen elements, but nothing works. I'm looking at it in tilt, and wonder if it is just because the select element is with divs that are before the modal footer div? I'm using the default CSS from chosen and bootstrap for this as well, so I haven't modified anything. example. HTML: <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true

How do you set the max height of an expanded “Chosen” element (jQuery plugin)

本小妞迷上赌 提交于 2019-11-30 17:40:52
At the moment I'm using a Chosen JQuery widget inside a JQuery dialog box, and as soon as you open the dropdown box, the size of the dropdown causes the dialog box to overflow, causing this: (notice that there are two scroll bars, one for the drop down box, and one for the dialog box, which renders scrolling pretty much useless: Is there a way to set: The max number of items displayed before you have to scroll, The max height of the select/chosen drop down box, or The max height of one of the containing elements Such that it will appear more like this (it's a photoshop, this is how I want it

How do you set the max height of an expanded “Chosen” element (jQuery plugin)

混江龙づ霸主 提交于 2019-11-30 16:44:30
问题 At the moment I'm using a Chosen JQuery widget inside a JQuery dialog box, and as soon as you open the dropdown box, the size of the dropdown causes the dialog box to overflow, causing this: (notice that there are two scroll bars, one for the drop down box, and one for the dialog box, which renders scrolling pretty much useless: Is there a way to set: The max number of items displayed before you have to scroll, The max height of the select/chosen drop down box, or The max height of one of the