options

jQuery filter select options

早过忘川 提交于 2019-12-09 03:22:59
问题 Is it possible to filter specific select options? I have a code : <select id="adcategory" name="adcategory"> <option value="">Select</option> <option value="25" class="dropdownparentcategory">Florida Atlantic University</option> <option value="26">- Books </option> <option value="27">- Electronics</option> <option value="28">- For Rent</option> <option value="17" class="dropdownparentcategory">Florida International University</option> <option value="18">- Books</option> <option value="19">-

How to get access to the selected element?

不问归期 提交于 2019-12-08 11:50:31
问题 i use d3.js and i created a "option" window, that allows me to choose between the index i of some elements of let's say an array with the length of 4 elements. The user Andrew Reid helped with this code in another thread, so all credits to him: var data = [10,20,30,40]; var color = d3.schemeCategory10; // color array built in //// Add the select and options: var select = d3.select('body') .append('select') .on('change',function() { update(this.value) }); var start = select.append('option')

Set selected using jQuery

徘徊边缘 提交于 2019-12-08 06:22:22
问题 I'm trying to change the selected option within this list.. Its only working for some and not others? selectedVal will either be Kelly Green, Navy etc... var selectedVal = $(this).text(); $("#product-variants-option-0 option[text=" + selectedVal+"]").attr("selected","selected") ; This is the select list: <select class="single-option-selector" id="product-variants-option-0"> <option value="Gunmetal Heather">Gunmetal Heather</option> <option value="Kelly Green">Kelly Green</option> <option

Shorten long options in a select options list

走远了吗. 提交于 2019-12-08 06:22:04
问题 I would like to be able to make any items in an options menu shorter depending on it's character size my attempt is as follows: <script> jQuery(document).ready(function() { jQuery("#groupId").each(function(){ var myoptions = jQuery('option').length; var shorter = myoptions.substring(0,10)+"..."; if (('myoptions')>10){ jQuery(this).find('option').text(shorter) } }); }); </script> html <select id="groupId" name="groupId"> <option value="0">Select...</option> <option selected="selected" value=

How to add all background options with options tree in wordpress theme?

这一生的挚爱 提交于 2019-12-08 06:19:41
问题 I'm relatively new to WordPress theme development, and I had to create a theme with options tree. I have successfully add some options with options tree plugin in my wordpress theme.But i am really stand when i go to add Background option. I have complete section an settings on theme option with 'type' => 'background', after i see i have find some options on dashboards theme options like 'select color', 'background-repeat', ''background-attachment', 'background-position' and background size.

yii method to disable selected options from multi select dropdown

妖精的绣舞 提交于 2019-12-08 05:34:15
问题 I am using yii dropdown with active records in that i am using multiselect dropdown. i am creating data with in which i am selected multiple option from dropdown.. while updating i want to disable selected option which i selected at time of creation. <code> <?php $savedSections = helpers::getQuestionnaireSectionList($model->questionnaire_id); $data = helpers::getSection(); $listData = CHtml::listData($data, 'section_id', 'section_name'); $htmlOptions = array('size' => '5', 'multiple' => 'true

How to make jqGrid dynamically populate options list based on row data

两盒软妹~` 提交于 2019-12-08 04:54:50
问题 I am using jQrid version 3.8.1 with inline editing and each row in the grid has several dropdown lists to populate. When the user edits the row, I need to do an AJAX query to get the values for each of these lists. I've seen this post regarding how to do that. It appears that the dataUrl and buildSelect features are the standard answer here. There are a few issues I can't figure out though: The row the user is editing has a value that must be passed into the dataUrl value. For example, say

Dynamic options dialog (using reflection)

旧街凉风 提交于 2019-12-07 20:48:40
问题 Does anyone know of a good component (C# WinForms) which would allow creating an options (settings) form, given a custom class with a bunch of properties? I am not looking for something shiny, but something merely better than a property grid. I can easily take care of the visual part, but I simply don't want to lose time doing reflection to add and bind controls if it already exists. I am pretty sure I've seen a Visual Studio options-like form somewhere before, which was created dynamically

Seekbar in Options Menu

♀尐吖头ヾ 提交于 2019-12-07 20:23:44
问题 I'm trying to add a seekbar item to my options menu, but all I get is a panel with my title for the text. In my main activity I'm doing this: @Override public boolean onCreateOptionsMenu(Menu menu) { getSupportMenuInflater().inflate(R.menu.activity_main, menu); return true; } And here is my activity_main.xml: <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/transparency_seekbar" android:showAsAction="never" android:title="test" android:actionViewClass=

http post request with cross-origin in javascript

落花浮王杯 提交于 2019-12-07 05:21:18
问题 i have a problem with a http post call in firefox. I know that when there are a cross origin, firefox first do a OPTIONS before the POST to know the access-control-allow headers. With this code i dont have any problem: Net.requestSpeech.prototype.post = function(url, data) { if(this.xhr != null) { this.xhr.open("POST", url); this.xhr.onreadystatechange = Net.requestSpeech.eventFunction; this.xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8"); this.xhr.send(data); } } I