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 Glass YUI effects widget.
Preview of the script we are going to build.
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 [...]
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 place your stepper in your [...]
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 [...]