Better version reference to the dashboard library.
Replace switch-case with jQuery selection for the buttons.