I want to set or update the the default selection of a LIST component via javascript. How can i achieve this w/ appery? tried this $('select option:contains("it\'s me")').prop('selected',true); but i think something is wrong w/ my syntax in appery?
I want to set or update the the default selection of a LIST component via javascript. How can i achieve this w/ appery? tried this $('select option:contains("it\'s me")').prop('selected',true); but i think something is wrong w/ my syntax in appery?
The code i tried is - $('desired_salary_select option:contains("Between 75000 and 125000")').attr("selected",true);
where desired_salary_select is the name of my list UI component and "Between 75000 and 125000" is one of the options.
Following code should help:
pre
code
Appery("mobileselectmenu_30").val("Vici").trigger("change");
/code
/pre
where: "mobileselectmenu_30" - select menu component name.
and "Vici" - is desire value.
you're the man igor. It works :
;
Appery("desired_salary_select").val("Between 50000 and 75000").trigger("change");
Note i also tried - $('div[dsid="desired_salary_select"]').val("Between 50000 and 75000").trigger("change"); but that didnt work, any guess why? I double checked the html and that is the correct dsid
You are using:
pre
code
$('div[dsid="desired_salary_select"]').val("Between 50000 and 75000").trigger("change")
/code
/pre
This jQuery selector could get only "div" element. But you should get "select" html element.