|
FigureHandler
This script facilitates the creation of layout rules for figures.
Current Version0.1 (28 August 2007) RequirementsLicenseFigureHandler is distributed under the liberal MIT License. UseTo use, simply include FigureHandler.js and prototype.js in the HEAD of your document. Then, initialize the FigureHandler: if( typeof( Prototype ) != 'undefined' &&
typeof( FigureHandler ) != 'undefined' ){
Event.observe( window, 'load', function(){ new FigureHandler; } );
}By default the following classes are applied: FigureHandler's Default classes
CustomizationYou can also customize FigureHandler by targeting a specific container if( typeof( Prototype ) != 'undefined' &&
typeof( FigureHandler ) != 'undefined' ){
Event.observe( window, 'load', function(){ new FigureHandler( 'main' ); } );
}or by providing a list of custom classes to be applied (using JSON syntax): if( typeof( Prototype ) != 'undefined' &&
typeof( FigureHandler ) != 'undefined' ){
Event.observe( window, 'load', function(){
new FigureHandler( 'main', { '0-27': 'small',
'27-100': 'large' } );
new FigureHandler( 'extras', { '0-50': 'potato',
'50-100': 'tomato' } );
});
}Required MarkupFigureHandler assumes all figures are DIV elements classified as "figure." It is recommended that the following syntax be used (at a minimum): <div class="figure">
<img src="faces-of-the-fallen.jpg" alt="The “Faces of the
Fallen” exhibit at Arlington National Cemetery." />
</div>But you can embed much more information, following some of the current practices in figure markup: <div class="figure">
<img src="fa.jpg" alt="" />
<p class="credit"><abbr class="type" title="Photograph">Photo</abbr>
by <cite>Aaron Gustafson</cite></p>
<p class="caption"><em class="title">Figure 1</em> The “Faces of the
Fallen” exhibit at Arlington National Cemetery.</p>
</div>DemoView the default demo or the custom demo. Optimized Releases
Development VersionIf you are interested in helping to further develop this script, you can download the uncompressed JavaScript source file. Change Log
| ||||||||||||||
dfg
this is so cleaver.
Thanks,
Thanks alot...
just in time.
Another important step in creating a CMS system that will allow normal users to publish that doesn't look like cruft.
You are a hero!
You are a hero!
Wrong link to FigureHandler.js There must be http://easy-designs.googlecode.com/svn/trunk/FigureHandler/working/FigureHandler.js instead of http://easy-designs.googlecode.com/svn/trunk/FauxSelect/working/FigureHandler.js