Debug JS on toggle control

Fixed the toggle feature for mobile interface