Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

JQuery help

Featured Replies

hey all,

 

I have this code, that says if the document is ready, show submit, once clicked, remove submit and show loading message. then it refreshes the page with thanks message and shows the submit button again.

 

$(document).ready(function() {
$('#submit').show();  
  //hide the submit button after click and shows message
  $('[id$=submit]').click(function() {  
     $('#loading').show();  
     $('#submit').hide();   
  });  
}); 

 

Problem is that if you click the button with invalid inputs (using live validation) and text areas, it hides it submit and doesn't come back, How do I change it so if basically tell the browser:

 

If input and textarea have the class "valid" then unlock or un-disable submit button, else lock or disable submit button...

 

form is here for verification

 

http://kihonweb.co.uk/get-in-touch.php

 

Thanks

You definitely need to use hasClass() and attr() methods here :). hasClass to check if you input and text area have those classes and attr() to disable and enable submit button.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.