开发者

jquery ui - show selected option on multiselect widget

开发者 https://www.devze.com 2023-02-28 21:31 出处:网络
I am using a Jquery UI multiselect box. If I access the box like this category = $(\"#edit_category\").val();

I am using a Jquery UI multiselect box.

If I access the box like this

category = $("#edit_category").val();

I see that it has a value already in there. I want this value to be visible from the beginning. I re开发者_StackOverflow社区ad somewhere that it'd be useful to set the "option tag" of the multiselect from "selected" to "selected"... I'm not sure what this means.

thoughts?


I read somewhere that it'd be useful to set the "option tag" of the multiselect from "selected" to "selected"... I'm not sure what this means.

it means that it would be the default selected option when the page loads


ah this helped me!

http://calisza.wordpress.com/2009/03/29/6-jquery-snippets-you-can-use-to-manipulate-select-inputs/#comment-652

2 $('#selectList :selected').text();

0

精彩评论

暂无评论...
验证码 换一张
取 消