Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 55 lines (41 sloc) 1.935 kb
80ed9c5d » Sean McArthur
2009-08-31 fixed README, cleaned up JS style, protected methods, fixed options
1 MGFX.Tabs
549314d7 » Sean McArthur
2009-08-31 initial commit
2 ===========
3
1519e890 » Sean McArthur
2010-02-18 added MGFX.Tabs#random. upped to 1.2.0
4 ![Screenshot](http://mcarthurgfx.com/images/blog/mgfxtabs.jpg)
549314d7 » Sean McArthur
2009-08-31 initial commit
5
1519e890 » Sean McArthur
2010-02-18 added MGFX.Tabs#random. upped to 1.2.0
6 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.
549314d7 » Sean McArthur
2009-08-31 initial commit
7
8
9 How to use
10 ----------
11
80ed9c5d » Sean McArthur
2009-08-31 fixed README, cleaned up JS style, protected methods, fixed options
12 Write some semantic HTML that describes your buttons and panes:
13
14 #HTML
15 <ul id="tabs">
16 <li><a class="tab" href="#" id="one">One</a></li>
17 <li><a class="tab" href="#" id="two">Two</a></li>
18 <li><a class="tab" href="#" id="three">Three</a></li>
19 </ul>
20 <div id="home">
21 <div class="feature">
22 <img src="img/mgfxtabs1.jpg" alt="" />
23 </div>
24 <div class="feature"">
25 <img src="img/mgfxtabs2.jpg" alt="" />
26 </div>
27 <div class="feature">
28 <img src="img/mgfxtabs3.jpg" alt="" />
29 </div>
30 </div>
31
32 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.
549314d7 » Sean McArthur
2009-08-31 initial commit
33
34 #JS
1b9e200c » seanmonstar
2009-12-11 fixing the how to use section
35 var tabs = new MGFX.Tabs('#tabs li a', '#home .feature');
d9004966 » Sean McArthur
2009-08-31 added Demo link to package and readme
36
37 Demo can be seen [here](http://seanmonstar.github.com/MGFX.Tabs/).
549314d7 » Sean McArthur
2009-08-31 initial commit
38
93b6ecf0 » Sean McArthur
2009-09-03 informs that Fx.Elements is needed
39 Uses [Fx.Elements](http://mootools.net/more#Fx.Elements) from MooTools More.
40
80ed9c5d » Sean McArthur
2009-08-31 fixed README, cleaned up JS style, protected methods, fixed options
41 Options
42 -------
549314d7 » Sean McArthur
2009-08-31 initial commit
43
2801f0b6 » Sean
2010-11-28 v1.3.0
44 ### Version 1.3.0
31190b7b » Sean McArthur
2009-08-31 added italics to README for option types
45 * **slideInterval**: (*int*) Time in milliseconds to remain on each slide. Default: 5 seconds.
46 * **transitionDuration**: (*int*) Time in milliseconds for the transition effect to take. Default: 1 second.
47 * **startIndex**: (*int*) A zero-based number for which Tab should be displayed first. Default: 0 (first Tab).
48 * **autoplay**: (*boolean*) Whether the tabs should automatically rotate. Default: false.
49 * **hover**: (*boolean*) Whether the mouse hovering over a tab should stop the autoplay. Default: true.
50 * **hash**: (*boolean*) Whether the Tabs should examine the hash of the URL to determine the startindex. Example: "example.com/portfolio#card". Default: true.
549314d7 » Sean McArthur
2009-08-31 initial commit
51
80ed9c5d » Sean McArthur
2009-08-31 fixed README, cleaned up JS style, protected methods, fixed options
52 License
53 -------
549314d7 » Sean McArthur
2009-08-31 initial commit
54
2801f0b6 » Sean
2010-11-28 v1.3.0
55 MIT License. Copyright 2008-2011 [Sean McArthur](http://seanmonstar.com).
Something went wrong with that request. Please try again.