[RCD] jQuery 1.6.2 in Roundcube 0.6 beta
Stephen J. Butler
stephen.butler at gmail.com
Tue Aug 23 10:02:39 CEST 2011
On Tue, Aug 23, 2011 at 2:57 AM, Roland Liebl <roland at roland-liebl.de> wrote:
> Am 23.08.2011 09:47, schrieb Stephen J. Butler:
>> On Tue, Aug 23, 2011 at 2:16 AM, Roland Liebl <roland at roland-liebl.de>
>>> I can't use .val() because the selector values vary dynamically
>>> and I know only the index. Are there concerns to switch back to
>>> DOM Method (document.getElementById('myid').selectedIndex = x)?
>> Isn't this what .prop() is for? Your case works for me with the latest
>> jQuery and Firefox.
> In the docs I don't see an example for my use-case:
> Please check the ticket I posted.
> The dropdown position is not changed.
>From the docs, 3rd paragraph:
"For example, selectedIndex, tagName, nodeName, nodeType,
ownerDocument, defaultChecked, and defaultSelected should be retrieved
and set with the .prop() method. Prior to jQuery 1.6, these properties
were retrievable with the .attr() method, but this was not within the
scope of attr. These do not have corresponding attributes and are only
I tried your example with this setup (through console) and it changed
the selection for me:
$("#foo").prop( "selectedIndex", 3 ) changes the select to "Four".
List info: http://lists.roundcube.net/dev/
More information about the Dev