troubleshooting Question

jQuery Tabs - Want to stop the tab from being accessed

Avatar of BILL Carlisle
BILL CarlisleFlag for United States of America asked on
JavaScriptjQuery
2 Comments1 Solution341 ViewsLast Modified:
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?
ASKER CERTIFIED SOLUTION
TechHelpr08210

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros