Menu icon Foundation
Rails/Foundation Accordion
 
This is a Foundation accordion with Rails form within accordion inputs. In the first accordion after data in input field user hits `enter`. I would like the `enter` keyCode 13 to open the next accordion and I created a handler using event.preventDefault to catch the "enter" key press to only work when user fills out all (4) accordion required input fields and have focus() on all inputs with each accordion toggle. The focus and keyCode 13 toggle isn't working. Can you use focus() with accordion input fields while also having the focus() or trigger show on next accordion that opens? Does anyone have examples? Can I use keyCode 13 to toggle to next accordion? Does anyone have examples?

railsaccordioninput focustoggleenter key

 
This is a Foundation accordion with Rails form within accordion inputs. In the first accordion after data in input field user hits `enter`. I would like the `enter` keyCode 13 to open the next accordion and I created a handler using event.preventDefault to catch the "enter" key press to only work when user fills out all (4) accordion required input fields and have focus() on all inputs with each accordion toggle. The focus and keyCode 13 toggle isn't working. Can you use focus() with accordion input fields while also having the focus() or trigger show on next accordion that opens? Does anyone have examples? Can I use keyCode 13 to toggle to next accordion? Does anyone have examples?