javascript - How can I validate 3 select elements with jQuery? -
i'm trying validate 3 select fields on form, application score keeping application hockey, , recording scoring plays. goal scorer, b primary assist, , c secondary assist. have following validation rules: a must not empty b cannot equal or c c cannot equal or b if b empty, c must empty so in other words, a, ab, or abc valid combinations, must unique. disabling submit button applying disabled bootstrap class/html attribute submit button. in actual code, = awaygoal, b = awaypassist, c = awaysassist i have following jquery code: var awaygoal = $("#awaygoal"); var awaypassist = $("#awaypassist"); var awaysassist = $("#awaysassist"); var awaygsubmit = $("#submitawayscore"); $('#awayscore select').change(function() { if(awaygoal.val() != "" && awaypassist.val() != awaygoal.val() && awaygoal.val() != awaysassist.val()) { if(awaypassist.val() != "" && awaysassist.val() != ...