js

Fix: jQuery("ul.sf-menu").superfish is not a function

Is your file throwing you a superfish is not a function or some other jQuery(‘blah blah blah’).functionname is not a function? Surround your call to that function with the ready() function to help ensure everything is loaded before the file tries calling non existent functions.

Read the full article →

Change Rel External to Target Blank using Prototype

Use javascript to make XHTML valid rel=”external” act like target=”blank” in a snap using the Prototype JavaScript library.

Read the full article →

JavaScript Cookies – Baking Has Never Been So Easy!

Setting, updating retrieving and deleting cookies with JavaScript is a whole lot easier than I remembered. I’ve not got a quick library of functions available at my fingertips for such actions, wanna see?

Read the full article →

Zip Code, Phone Number and Replacing Empty Fields with Really Easy Validation

While using the Really Easy Validation JavaScript validation library I’ve accumulated a few custom validations that for US phone numbers, US zip codes, Canadian postal codes as well as replacing empty fields or fields that don’t contain a numeric value. Good stuff!

Read the full article →

Thinking About Graceful Degradation and Progressive Enhancement

Graceful degradation is something that really needs to be considered when it comes to server side scripting. What happens to your drop down menu, your fly-out magic or your ajax functionality when JavaScript is no longer enabled?

Read the full article →

Alternating Colors Using Prototype

Using the CSS nth-child selectors I’ve learned how to alternate colors using the Prototype library. Great to apply a style to your tables without having to apply styles by hand or using extra loops/counting with your server side scripting.

Read the full article →

Limit Characters in a Textarea with Prototype

Limit and display the number of characters available in a text area using my little add on script to the Prototype JavaScript library. Very easy to implement, and great feedback to your form filler-outers.

Read the full article →

Evolving Styles: Add, Change Remove Classes with Prototype

Using the Prototype JavaScript library it’s easy to apply, add or remove a class to and from an element. Just few simple lines of JavaScript and you have a whole new interactivity at your fingertips.

Read the full article →

First, Last, Active and Only List Styles With Prototype

It’s easier than ever to apply the classes ‘first, ‘last’, and ‘active’ to your navigation lists using the Prototype Javascript library. Of course this will only work for a JavaScript enabled environment but if you have a list that is out of control, or already requires Javascript, this might be your best solution.

Read the full article →

Simple Hide and Show with Prototype

Hiding and showing elements using Prototype is super easy. We’ll walk through from the most basic hid and show functionality to slightly more complex functionality where you can change the toggle’s text or image.

Read the full article →