Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- $("#divs .inputs").on('keyup', function() {
- var error = false; // var используется для объявления локальной переменной
- $(".inputs").each(function(){
- if($(this).val()==""){
- error = true;
- }
- })
- if(error == true) {
- $("#mainButton").css({"background-color": "gray", "cursor": "not-allowed"});
- }
- else {
- $("#mainButton").css({"background-color": "darkred", "cursor": "pointer"});
- }
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement