javascript - How to ignore case (upper/lower) while triggering change for select in jquery? -


please see code below:

<html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> </head> <body> <select> <option>one</option> <option>two</option> <option>three</option> <option>four</option> <option>five</option> </select> <script> $("select").val("two").trigger("change"); </script> </body> </html> 

in case option not set value "two" . if change :

$("select").val("two").trigger("change"); 

then works. how can ignore case while triggering change select?

$("select").val("two".tolowercase()).trigger("change"); 

make value in lowercase , able check not matter upper or lower case in string


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -