Reputation: 45692
I've got something like this.
Question: How to disable opening Home
and Profile
tabs in new window?
Upvotes: 0
Views: 2545
Reputation: 45692
The solution is very simple: add oncontextmenu="return false;" to the ul element.
<ul class="nav nav-tabs" oncontextmenu="return false;">
<li class="active"><a href="#home" data-toggle="tab">Home Tab</a></li>
<li><a href="#profile" data-toggle="tab">Profile Tab</a></li>
</ul>
Upvotes: 3
Reputation: 285
Try using this
$('#view-modal-nav a').click(function (e) {
e.preventDefault(); //Prevents Opening of Links
$(this).tab('show'); //Shows the Corresponding tab
});
Upvotes: 0
Reputation: 1614
You can disable the links from doing anything:
$('#view-modal-nav a').click(function(event){
event.preventDefault();
//handle your code here
});
Upvotes: 0