Advertisement
zhukov000

Example

Apr 2nd, 2020
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. $(document).ready(function(){
  2. $("#divs .inputs").on('keyup', function() {
  3. var error = false; // var используется для объявления локальной переменной
  4. $(".inputs").each(function(){
  5. if($(this).val()==""){
  6. error = true;
  7. }
  8. })
  9. if(error == true) {
  10. $("#mainButton").css({"background-color": "gray", "cursor": "not-allowed"});
  11. }
  12. else {
  13. $("#mainButton").css({"background-color": "darkred", "cursor": "pointer"});
  14. }
  15. })
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement