diff options
Diffstat (limited to 'content/post/2008-10-11-tabbing-through-fields-vertically.markdown')
-rw-r--r-- | content/post/2008-10-11-tabbing-through-fields-vertically.markdown | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/content/post/2008-10-11-tabbing-through-fields-vertically.markdown b/content/post/2008-10-11-tabbing-through-fields-vertically.markdown deleted file mode 100644 index c27c10b..0000000 --- a/content/post/2008-10-11-tabbing-through-fields-vertically.markdown +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Tabbing through fields vertically" -date: 2008-10-11T01:54:00Z -comments: false -url: /post/54058512/tabbing-through-fields-vertically -tags: ---- - - - -Sometimes it’s useful to switch the browser’s default tabbing behavior (left to right) to the opposite (top to bottom) when your input fields are in a grid layout instead the of the usual single column layout. Having to do this manually is a real pain, especially for large grids; So here is a solution in javascript, using mootools: - -<!--more--> - -```javascript -window.addEvent('domready', function(){ - var trs = $$('#mytable tr') - var accum = 0 - trs.each(function(tr, trindex){ - accum = trindex + 1 - tr.getChildren().each(function(td, tdindex){ - td.getChildren('input')[0].tabIndex = accum - accum = accum + trs.length - }) - }) -}) -``` |