JQuery select dropdowns by id using AND and OR operators combination
How can i able to perform all the combinations of the dropdowns of the select tag example code as follows
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script> $(document).ready(function(){ if( $("#disaster_1,#genre_id_1,#area_id_1").change("background-color", "yellow");) { alert("threee changed"); } else{ $("#disaster_1,#genre_id_1").css("background-color", "red"); } }); </script> </head> <body> <h1>Welcome to My Web Page</h1> <h2>Nice to meet you</h2> <div>Very nice indeed.</div> <p>How are you?</p> <p>I'm fine, <span>thanks.</span></p> <select name="area_id[1]" id="area_id_1" class="adminclass"> <option value="0" disabled selected>Select an area...</option> <option value="1" >talluk</option> <option value="2" >district</option> <option value="3" >village</option> </select> <select name="genre_id[1]" id="genre_id_1" class="thematicclass"> <option value="0" disabled selected>Select a genre...</option> <option value="1" >thematic</option> <option value="2" >forest</option> <option value="3" >lulc</option> </select> <select name="disas_id[1]" id="disaster_1" class="diasterclass"> <option value="0" disabled selected>Select a genre...</option> <option value="1" >flood</option> <option value="2" >cyclone</option> <option value="3" >earthquake</option> </select> </body> </html>