After upgrade to jQuery UI 1.10.0 the tabs are not working correctly anymore. Sometimes clicking on the tab results in refreshed window with the content of the ajax call to MVC action. So it looks like the anchor event is called before the ui-tabs event???
HTML code:
...
<div id="rightTabsPanel">
<ul>
<li class="tab-shadow"><a href="@Url.Action("Agenda", "Home")">Agenda</a></li>
<li class="tab-shadow"><a href="@Url.Action("Twitter", "Home")">Twitter</a></li>
<li class="tab-shadow"><a href="@Url.Action("Buienradar", "Home")">Buienradar</a></li>
<li class="tab-shadow"><a href="@Url.Action("FileKaart", "Home")">File kaart</a></li>
</ul>
</div>
...
My javascript code:
$(document).ready(function(){
...
$("#rightTabsPanel").tabs({
//Replacement for cache:false
beforeLoad: function( event, ui ) {
if ( ui.tab.data( "loaded" ) ) {
event.preventDefault();
return;
}
ui.jqXHR.success(function() {
ui.tab.data( "loaded", true );
});
},
beforeActivate: function (event, ui) {
if (ui.oldTab.text() == "Twitter" || ui.oldTab.text() == "Yammer") {
$("#slider-code", ui.oldTab).empty();
}
else if (ui.oldTab.text() == "File kaart") {
fileKaartDeInitialize(ui.oldPanel);
}
}
}).bind('tabsload',function(event, ui){
if (ui.tab.text() == "Agenda") {
var $this = $('#slider-code', ui.panel);
$this.tinycarousel({ axis: 'y', interval: true, controls: false, intervaltime: 7000 })
}
else if (ui.tab.text() == "Twitter") {
var $this = $('#slider-code', ui.panel);
$this.tinycarousel({ axis: 'y', interval: true, controls: false, intervaltime: 5000 })
}
else if (ui.tab.text() == "Buienradar") {
var $this = $('#slider-code', ui.panel);
}
else if (ui.tab.text() == "File kaart") {
fileKaartInitialize($('.fileKaartPage'));
}
});
$("#rightTabsPanel .ui-tabs-nav li").unbind();
...
}
After reading jQuery UI 1.10 Upgrade Guide carefully I could fix some minor bugs in my code but the bug described above still remains.
My questions: - Does anyone experience the same problems after upgrading to jQuery UI 1.10? - Does anyone have a solution or ideas to get this problem fixed?