tabsselect/tabsshow don't fire when re-selecting current tab?
Hi Guys,
I want to be able to "reload" the current (ajax) tab after an action
has been performed.
I also need to re-bind forms and clicks and other events as well.
When my function runs the following:
function tabSensitiveReload() {
if(tab_div_id) {
var $tabs = $(".ui-tabs-nav").tabs();
$tabs.tabs('select', $tabs.data('selected.tabs'));
} else {
window.location.reload();
}
}
I don't get alerts that I placed for the tabsselect/tabsshow events:
var tab_div_id = '';
$(document).ready(function() {
$('.ui-tabs-nav').bind('tabsselect', function(event, ui) {
alert('tabsselect:'+ui.panel.id);
});
$('.ui-tabs-nav').bind('tabsshow', function(event, ui) {
tab_div_id = ui.panel.id;
alert('tabsshow:'+tab_div_id);
admin_bind_all();
});
});
The code works perfectly when I use tabs "normally", only when I click
my test link that "refreshes" the current tab, my event bindings (as
set in admin_bind_all()) are lost.
Any pointers?
// S