Controllable Navigation Bars with JavaScript, Part II (Page 1 of 4 )
In the first article, we developed a simple JavaScript function that performs the task of hiding and showing a side bar within a Web document. In this article, we will clean up our code to deal with potential browser incompatibilities.
Introduction
Welcome to the second part of the series "Controllable navigation bars with JavaScript." In first article in this series, we briefly referred to the wide gamut of techniques often present in websites aimed primarily at boosting interactivity with users, while trying to expand capabilities beyond the limits of conventional HTML. In particular, we focused our attention to side navigation bars, giving users the possibility of hiding or displaying them in turn, and making the page's main content area much larger, and thus viewed more easily.
If you feel that mysterious "deja vu" sensation when you're reading these lines, it's probably because you've seen this technique used hundreds of times in several popular software applications. The first example that comes quickly to my mind is Macromedia's Flash and Dreamweaver programs, featuring stretching panels. Also worth noting is the file-browsing tab of Adobe Photoshop. Undoubtedly you'll want to add your own examples to the list.
Having said that, all of these little details, when utilized properly, contribute to improving the usability of Web pages. If we think of it that way, it's great when we can do something to make our sites more usable without putting in hours of effort. I firmly believe that it's worth looking at these techniques. Just keep reading.
Next: Dealing with those details >>
More JavaScript Articles
More By Alejandro Gervasio