Archive for JavaScript

Simple Javascript Dropdown Menu With Opacity Effects

11 May 2009

This menu features a simple .js code, without jQuery, or other complicated Javascript library. Built on prototyping functions, the menu functions perfectly both on Firefox and IE. I have tested it with IE7 and IE8, and it yielded no error.

screenshot-drop-down-menu

Download the files below and play with the demo. Remember to place the Javascript caller code and the end of the document, but before any tracking scripts.

Download Simple JS Dropdown Menu

JavaScript TV Prompter

22 January 2009

* This script has been updated. See this post. *

This week’s tutorial is about jQuery, XHTML and TV prompters. In order to build such a script we, are going to use the jQuery library, and the old and deprecated marquee tag.

I will also use Remy Sharp’s jQuery plugin for marquee.

Download jQuery Prompter

tv-prompter-01 tv-prompter-02

Remy Sharp’s plugin was used for this script.

Javascript Switch Menu

3 January 2009

Here is a very simple Javascript switch menu based on Javascript and CSS. Does not use ul/li structure and is very easy to configure and style on parent/child basis, using CSS.

switch-menu

Download/View Switch Menu

Javascript Character Counter For Text Areas

2 January 2009

I’ve been searching for a character counter for one of my link directories. The Description field is supposed to hold about 400 characters. More than that looks like spam.

So I’ve searched the Internet and found several good solutions and loads of crappy ones. Here is what I found and I’m currently using.

Read more »

"How Old Is The Internet" Widget

23 November 2008

The Internet appeared in 1983. More detailed discussions on this subject are outside the scope of this article. We will learn how to create a JavaScript widget showing how old is the internet.

First of all, we need to write a prototype function of a date. As the JavaScript code is wrapping a bit weird with my theme, here is the finished .js file:

time.js

As the function is included in the head (either external or included), all we need to add is:

<script type="text/javascript">
	var oPast = new Date(1983, 1, 1, 0, 0);
	document.write(oPast.toTimeSinceString(6, ',  ', ' and '));
</script>

Download a .zip file with a finished HTML example.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes