jquery ui select menu - change value

923 views Asked by At

How to change value for selectmenu? On click of button I need to reset to default value like this.

$j('#mm').val('mm');
$j('#mm').selectmenu('refresh', true);

I looks like the value is changed, but I have the problem with the width of select menu, it becomes too small. How to update value without change widith of element?

This code cause javascript error no such method: $('#mm').selectmenu("value", 'mm');

1

There are 1 answers

0
Oleg On

It can be solved like this one:

$j('#mm-button .ui-selectmenu-text').text('mm');
$j('#dd-button .ui-selectmenu-text').text('dd');