detach listeners and remove element data

10.3.x-maintenance
cTn 2014-03-15 15:43:08 +01:00
parent b11a84217b
commit dcdccd683d
2 changed files with 8 additions and 0 deletions

View File

@ -48,6 +48,11 @@ $(document).ready(function() {
sensor_status(sensors_detected = 0); // reset active sensor indicators sensor_status(sensors_detected = 0); // reset active sensor indicators
$('#tabs > ul li').removeClass('active'); // de-select any selected tabs $('#tabs > ul li').removeClass('active'); // de-select any selected tabs
// detach listeners and remove element data
$('#content').empty();
// load default html
tab_initialize_default(); tab_initialize_default();
} }

View File

@ -69,6 +69,9 @@ $(document).ready(function() {
// Highlight selected tab // Highlight selected tab
$(self).parent().addClass('active'); $(self).parent().addClass('active');
// detach listeners and remove element data
$('#content').empty();
switch (tab) { switch (tab) {
case 'tab_initial_setup': case 'tab_initial_setup':
tab_initialize_initial_setup(); tab_initialize_initial_setup();