2
2
Function: TabInterface()
3
3
Author: Aaron Gustafson (aaron at easy-designs dot net)
4
4
Creation Date: 7 December 2006
5
- Version: 0.4.1
5
+ Version: 0.4.2
6
6
Homepage: http://github.com/easy-designs/tabinterface.js
7
7
License: MIT License (see MIT-LICENSE)
8
8
Note: If you change or improve on this script, please let us know by
9
9
emailing the author (above) with a link to your demo page.
10
10
------------------------------------------------------------------------------*/
11
11
function TabInterface ( el , i ) {
12
12
// Public Properties
13
- this . Version = '0.4.1 ' ; // version
13
+ this . Version = '0.4.2 ' ; // version
14
14
15
15
// Private Properties
16
16
var _i = i ; // incrementor
@@ -70,6 +70,7 @@ function TabInterface( el, i ){
70
70
_cabinet . innerHTML = '' ;
71
71
removeClassName ( _cabinet , 'tabbed' ) ;
72
72
addClassName ( _cabinet , 'tabbed-on' ) ;
73
+ _cabinet . appendChild ( _index ) ;
73
74
var aLen = arr . length ;
74
75
for ( var k = 0 ; k < aLen ; k ++ ) {
75
76
// build the div
@@ -84,7 +85,7 @@ function TabInterface( el, i ){
84
85
tab . folder = folder . getAttribute ( 'id' ) ;
85
86
tab . setAttribute ( 'id' , tab . folder + '-tab' ) ;
86
87
tab . onclick = swap ; // set the action
87
- tab . onkeypress = moveFocus ; // add the keyboard control
88
+ tab . onkeydown = moveFocus ; // add the keyboard control
88
89
var heading = folder . getElementsByTagName ( _tag ) [ 0 ] ;
89
90
if ( heading . getAttribute ( 'title' ) ) {
90
91
tab . innerHTML = heading . getAttribute ( 'title' ) ;
@@ -105,7 +106,6 @@ function TabInterface( el, i ){
105
106
}
106
107
// add the index
107
108
addClassName ( _index , 'tab-list' ) ;
108
- _cabinet . appendChild ( _index ) ;
109
109
}
110
110
function swap ( e )
111
111
{
0 commit comments