A simple to use Tabs plugin using MooTools. Uses your normal semantic mark-up, and only requires a single line to get your tabs going.
Write some semantic HTML that describes your buttons and panes:
<ul id="tabs">
<li><a class="tab" href="#" id="one">One</a></li>
<li><a class="tab" href="#" id="two">Two</a></li>
<li><a class="tab" href="#" id="three">Three</a></li>
</ul>
<div id="home">
<div class="feature">
<img src="img/mgfxtabs1.jpg" alt="" />
</div>
<div class="feature"">
<img src="img/mgfxtabs2.jpg" alt="" />
</div>
<div class="feature">
<img src="img/mgfxtabs3.jpg" alt="" />
</div>
</div>
Invoke the constructor. The first argument is the tab buttons, the second argument is the tab panes. A third optional argument is a set of options to override the defaults.
var tabs = new MGFX.Tabs('#tabs li a', '#home .feature');
Demo can be seen here.
Uses Fx.Elements from MooTools More.
MIT License. Copyright 2008-2011 Sean McArthur.
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus