Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Destroy the combobox
- $(".combobox").combobox("destroy");
- // Unselect the currently selected option
- $("#selectlist option:selected").removeAttr("selected");
- // Select the option you want to select
- $("#selectlist option[value='test']").attr("selected", "selected");
- // Create the combobox again
- $(".combobox").combobox();
- $('#scale').val('square');
- $("#scale").selectmenu("refresh");
- function combobox_select(el,val){
- $(el).combobox("destroy");
- $(el+' option:selected').removeAttr("selected");
- $(el+' option[value="'+val+'"]').attr("selected", "selected");
- $(el).combobox();
- }
- //
- $('#dvid option:selected').removeAttr("selected");
- $("#dvid option[value='"+dvid+"']").attr("selected", "selected");
- $("#dvid").selectmenu("refresh");
- $('#combobox option:selected').removeAttr("selected");
- $('#combobox option[value="'+prepId+'"]').attr("selected", "selected");
- $('#combobox').parent().find(".custom-combobox-input").val($("#combobox option[selected]").text());
- $('#role option:selected').removeAttr("selected");
- $('#role option[value="'+roleId+'"]').attr("selected", "selected");
- $('#role').parent().find(".ui-selectmenu-text").text($("#role option[selected]").text());
- $('#combobox option:selected').removeAttr("selected");
- $('#combobox option[value="'+v+'"]').attr("selected", "selected");
- $('#combobox').parent().find(".custom-combobox-input").val($("#combobox option[selected]").text());
- $('#role option:selected').removeAttr("selected");
- $('#role option[value="'+v+'"]').attr("selected", "selected");
- $('#role').parent().find(".ui-selectmenu-text").text($("#role option[selected]").text());
- $('#combobox option[selected]').removeAttr("selected");
- $('#combobox option[value="'+prepId+'"]').prop({defaultSelected: true});
- $('#n-job option:selected').removeAttr("selected");
- $('#n-job option[value="'+$(this).data('job')+'"]').prop({defaultSelected: true});
- $("#n-job").selectmenu("refresh");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement