I want to load only links within a certain div inside the tab, otherwise it should just go to the actual link.
Current the code i use loads all links inside the content in the same tab
<script type="text/javascript">
$(function(){
$('#tabs').tabs({
load: function(event, ui) {
$('a', ui.panel).click(function() {
var tabId=$('#tabs').tabs('option', 'selected');
$('#tabs').tabs("url", tabId, this.href).tabs("load",tabId);
return false;
});
}
});
});
</script>
Tab Page
<div id="sresults" style="width: 520px">
<div id="tabs">
<ul>
<li><a href="mylink.html">Songs</a></li>
<li><a href="mylink.html">Albums</a></li>
<li><a href="mylink.html">Videos</a></li>
<li><a href="mylink.html">Entire Blog</a></li>
</ul>
</div>
</div>
And then heres the page inside the tab
<div id="content">
<a href="permalink.html">My links</a>
</div>
<div id="navi"><a href="tab?page=2">Next Page</a>
</div>
I want the links inside the navi div to load within the tab, but all links outside should go to the actual link
I’m guessing you only want to load the navigation links inside the tab.
If so, just replace
With
Although, I suggest you use a
classto select your navigation div instead of using anidbecause you might end up with duplicateids, which could cause problems later on.