I want to run a function and also check if element1 is enabled and if so to disabled it and element2 and the other way around.
<input type="" onclick = "function(); element1.disabled==true ? (element1.disabled=false, element2.disabled=false ) : (element1.disabled=true, element2.disabled=true)" />
How do i make this code work ?
Since you can't used ";" inside "()" i tried "," but it didn't worked.
{}:function(){...}, your code should work