I suppose author wanted to say that selecting option in his dropdown does not result in what he expected. Thanx in advance. Anyone can help me to resolve this problem. $('#periodSelect option').removeAttr('selected'); $("#periodSelect option[value='11']").attr('selected',true); description: The code, when executed for the first time, doesn't chenge what I can se in the dropdown. HTMLDOM: How to change text “files selected” from upload button using jquery or javascript? I want to fire a click event(not change event) on select option tags. Its working in firefox and IE 9. Steps to reproduce: Try opening country drop-down in this pen in chrome 53 through dev tools or android chrome 53 version. November 21, 2016, at 9:34 PM. Unfortunately, setting the CSS background-color property does not work for (most/all?) Clicking on the arrow on the select option opens it, but not on select from the item. I'm receiving the selected option text instead of the selected option value, which is annoying. Note: The value "-1" will deselect all options (if any). In other words, any option contained within the element.. Here's a screenshot: The problem occurs erratically and happens with both Chrome and Chromium, but not with Firefox. We can use user-select property in CSS to disable text selection highlighting in HTML pages.It is not a standard feature, but available in all modern browsers except IE 9 & before.. Table of Contents. If Google Chrome is set as your default browser, all you need to do is double-click the HTML file and it will automatically open in Chrome. When executed for the second time it makes the change. Ajax setting variable not working in different scopes. This is not a way to go. I'm not quite sure whether it is due to some strange binding in my code or an issue within Angular itself, and since also the guys on the IRC channel were not able to help me, I'm posting it here . I'm looking for a workaround for a rendering bug in Chrome. The element looks as if it is initializing as expected, however the click event is not bringing up the available options. – kace91 Nov 29 '14 at 0:29 BTW I did a little fiddling with your own script and it seems that the problem is using an id with . [closed]. Android xml design slowing down my application, Passy password generator with boolean parameters, Dashboard Header button and footer button not getting aligned properly in concrete 5, Laravel 8 - Automatically update a form field when certain value is selected, working but need to get that piece from mysql. We earn a referral fee for some of the services we recommend on this page. The or Gérard Talbot. It'll directly go to following option: Web Platform Controls updated UI If enabled, HTML forms elements will be rendered using an updated style. Note since live is disabled you will need to manually call $("#second").minimalect('update');. This code, however: is replacing this nicely generated HTML with ` onclick event is not working on IE and Chrome but it is working fine in firefox, here I don't want to use onchange event on select tag bcz it will not trigger an event if user selects same option again But it can cause issues in some cases. Your updated code works. Note: If no option is selected, the selectedIndex property will return -1. One way to do it, is to generate or initialize second dropdown on the fly (you need to add style="display: none;" to the