JavaScript

Creating Pop-up Notes with CSS and JavaScript Part II

A pop-up note contains information and can be made to appear when a visitor to your website moves the mouse over the appropriate area. In our second of two articles about pop-up notes, Alejandro Gervasio explains how to create multiple pop-up notes on a Web page using CSS and JavaScript.

Weíve gone a long way to make sure that our scripts works with multiple pop-up notes, and is useful when working with modern browsers. However, what about older browsers, or current browsers with JavaScript turned off? What about people with disabilities who use a screen reader? Considering that the number of people that fall under any of these categories is small, itís still a strong reason to use JavaScript code prudently. Regarding this particular example, if JavaScript is turned off, the rest of the Web page content will still work, even without the notes. But itís strongly recommended to use pop-up notes to provide additional information. Sensitive and critical information should always be presented to the users in the safest way possible.

Before we go deeper into the code, itís valid to consider that when weíre working with CSS and JavaScript, browser incompatibility issues might come up. So, itís always advisable to perform a browser checking process to generate the proper code, in order to determine which version of the Document Object Model (DOM) to use, which is often associated with the old browsers.

DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.