Link to home
Start Free TrialLog in
Avatar of BILL Carlisle
BILL CarlisleFlag for United States of America

asked on

jQuery Tabs - Want to stop the tab from being accessed

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
Avatar of TechHelpr08210
TechHelpr08210
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BILL Carlisle

ASKER

Thats great! Thanks for the help!