MooColumns 0.67 beta
MooColumns is a MooTools 1.2 class that allows you to divide content into multiple columns quickly and easily.
Syntax:
html:
<link rel="stylesheet" href="css/mooColumns.css" type="text/css" media="all" /> ... <div class="multiColumn">Content Here</div> ... <script type="text/javascript" src="js/mootools-1.2-core-yc.js" ></script> <script type="text/javascript" src="js/MooColumns_0.66.js" ></script>
javascript:
var myColumns = new MooColumns({/*options here*/});
Options:
Examples:
- Example 1: Double Columns
- Example 2: Four Columns with Column Breaks
- Example 3: Call Out Box
- Example 4: Multiple MooColumns Instances
// divide all elements with the multiColumn class into 2 columns
var myColumns = new MooColumns({});
// divide all elements with the multiColumn class into 3 columns
var TripleColumns = new MooColumns({ numOfColumns:3 });
// divide the element with the id of "article" into 4 columns
var moreColumns = new MooColumns({ selector:'#article', numOfColumns:3 });
// divide all elements with the multiColumn class into 3 columns
// but make the overall multiColumn area 10 pixels less wide
// and nudge it 10px to the left and 10px down
var myTweakedColumns = new MooColumns({
tweak:{
width:-10,
x:10,
y:10
},
numOfColumns:3
});
Notes:
Column Breaks: MooColumns looks for either a span with the class of "colBreak" or two consecutive horiztonal rule elements to use as the column breaks.
Requirements: MooTools 1.2 Core.
Compatibility: All A-grade browsers..
The creation of a MooColumns instance must be wrapped in a domready event.
window.addEvent('domready', function() {
var myColumns = new MooColumns({});
});
| Download |