There is very little JavaScript there. Only two functions to open and close the side panel.
The CSS really works the "magic."
The media query section of the custom.css:
@media screen and (max-width: 600px) {
#leftspan-btn {display: block; margin: -83px 0px 0px 0px;}
.nt-menu-div {display: none;}
.nt-locate-button {display: none;}
.nt-clear-button {display: none;}
.header_text {font-size: 20px;}
.nt-browse-header {margin: 25px 0px 0px 0px;}
}
is what performs most of the heavy lifting. In fact, I think some of the css classes listed above are not even used in the example app.
Basically, I use the classes in the media query to modify existing css classes based upon the size of the screen. In this case, a width of 600 pixels or less. I hide, move, or otherwise modify elements on the displayed page to be more user friendly on smaller screens.
Don