jQuery Tabs - Want to stop the tab from being accessed

BILL Carlisle
BILL Carlisle used Ask the Experts™
on
Hi,
I am using jQuery Tabs and I put a click event on it as below:
If user did not fill in required fields do not go to new tab.

  $('#TABP ul li a').click(function(){
       if(check_required_fields()){
           //allow normal behavior of clicked on tab
       } else{
          // check_required_fields() alerted user with required field
          // stay on the original tab - don't go to clicked on tab
       }
  });

- Want to stop the tab from being accessed if required fields are not completed on current tab.

Any thoughts?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Try This script. Answer one shows you how to disable specific tabs and can be called through any event.

http://stackoverflow.com/questions/5643500/jquery-validation-multiple-tabs-validate-one-at-a-tim
BILL CarlisleAPEX Developer

Author

Commented:
Thats great! Thanks for the help!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial