Alternate colors to table rows with javascript (YUI)

This article will show you how to add alternate colors to table rows without any server side development or hard coding your scripts, thus providing good readability for your users and great flexibility for you. We will use the YUI library for that. The HTML We need to create our basic HTML file containing a table and … Continue reading Alternate colors to table rows with javascript (YUI)

8 practical tips to make your web pages faster

Yahoo’s Exceptional Performance team has compiled a list of 34 best practices to have faster web pages. In this post I’ll show you 8 tips which helped me to get a B grade in YSlow! for web pages that I develop. Currently YSlow’s web page analysis is based on 13 identified basic rules that affect web page performance. In decreasing … Continue reading 8 practical tips to make your web pages faster

Show/hide containers by only adding CSS classes without writing javascript code (YUI-based)

This post will show you how to add the collapse/expand functionality in your HTML pages, perfect for FAQs by only adding two class names to your existing page and including the scripts below. Of course it’s all YUI-based and also a demo of the fantastic YUI selector utility. What does the script do ? OK, suppose … Continue reading Show/hide containers by only adding CSS classes without writing javascript code (YUI-based)

nouzil.com – a new Mauritian portal on the web (YUI-based)

I came to know the existing of a new Mauritian portal via Avinash called nouzil (which means our island in creole) and I must say at first look it reminds me of Netvibes a lot. I think the nouzil.com team picked up some bits and pieces from Netvibes.com. Anyway, looking behind the scenes I notice that the new portal uses YUIa lot, in fact it’s all YUI-based. … Continue reading nouzil.com – a new Mauritian portal on the web (YUI-based)

YUI-based alert box – replace your ugly javascript alert box

This tutorial will explain how you can override the default alert box of your browser, without modifying your existing code and by adding 2 lines of javascript code. Today, most reputable web hosting companies allow you to do this server-side. Those 2 famous lines After downloading the package and extracting it to your folder, add … Continue reading YUI-based alert box – replace your ugly javascript alert box

Expanding/collapsing javascript menu

In this post I’ll show you how to create an expanding/collapsing menu like Slashdot left menu used to be, using the YUI library and Dav GlassYUI effects widget. The HTML markup for our menu is : <div id=”menu”> <h1 id=”menu-title”>Menu</h1> <div id=”menu-links”> <ul> <li>Home</li> <li>About</li> <li>CSS</li> </ul> </div> </div> We use 2 div tags, one for holding the menu itself and the … Continue reading Expanding/collapsing javascript menu

YUI-based numeric stepper widget

Since I had some problems with YUI slider, I decided to write a YUI-based numeric stepper that allows users to select values within a predefined range. To instantiate the widget include the following files : <!– CSS –> <link rel=”stylesheet” type=”text/css” href=”stepper/stepper.css” /> <!– Dependencies –> <script type=”text/javascript” src=”http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js”></script> <!– Stepper source file –> <script type=”text/javascript” src=”stepper/stepper-min.js”></script> Then … Continue reading YUI-based numeric stepper widget

Simple YUI Cookie example – javascript text magnifier for your page

Since YUI 2.5.0 there’s the Cookie utility and at this time of posting, it’s still in beta version. I’ll show you how we can use this simple utility to write a small javascript app. The piece of code we will be writing, using the YUI library (my favorite), will allow users to increase/decrease their font size for a block … Continue reading Simple YUI Cookie example – javascript text magnifier for your page