diff --git a/js/serial_backend.js b/js/serial_backend.js index 3905e33bcd..2bd9be2979 100644 --- a/js/serial_backend.js +++ b/js/serial_backend.js @@ -48,6 +48,11 @@ $(document).ready(function() { sensor_status(sensors_detected = 0); // reset active sensor indicators $('#tabs > ul li').removeClass('active'); // de-select any selected tabs + + // detach listeners and remove element data + $('#content').empty(); + + // load default html tab_initialize_default(); } diff --git a/main.js b/main.js index 14b4263e23..8ac0abdcd7 100644 --- a/main.js +++ b/main.js @@ -69,6 +69,9 @@ $(document).ready(function() { // Highlight selected tab $(self).parent().addClass('active'); + // detach listeners and remove element data + $('#content').empty(); + switch (tab) { case 'tab_initial_setup': tab_initialize_initial_setup();