4

I have jQuery tab, it works perfectly, I want to make the tabs to not be clickable and that can be done by removing href from a tags but this will cause the tabs to crash, is there a way to remove links from the tabs without causing a crash?

I will add next and back buttons on each tab so user can move one tab each time. I want to make it as wizard but in the side-tabs style.

Note: I have an idea, to remove href from a tag when mouse over and put the href parameter and hat can be done by using toggle function, but I need your help to do that, any other ideas are welcome.

2 Answers 2

4

You can either disable them:

$('#tabs').tabs({
    disabled: [0,1,2,3]
});

Or you could remove the click event:

$('#tabs')
    .tabs()
    .find('.ui-tabs-nav a')
        .unbind('click.tabs');

DEMO

Sign up to request clarification or add additional context in comments.

1 Comment

thank you guys (Didier and Johan) for your help, I really appreciate that.
2

Disable them?

$(".tabs").tabs({
    disabled: [2]  //disable third tab. you can pass an array of indexes here like [0,1,2,3,4]
});

Fiddle: http://jsfiddle.net/WqPtr/5/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.