select - Jquery .prop("selected", "selected") doesnt work on ipad chrome/safari -


i have problem code :

$('#activity_filter_type_activity option').eq(1).prop("selected", true); 

it works on classic desktop not in safari/chrome on ipad. can me ?

try using ".attr" checked

$('#activity_filter_type_activity option').eq(1).attr('checked',true); 

i found solution in other thread, same problem .prop() vs .attr()


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -