// login : tabindex + ux

This commit is contained in:
Kevin Granger committed 2013-10-11 12:28:01 +02:00
1 parent c68101653d
commit cd5a308ad7
2 files changed
+38 -17

No files matched your search

+14
View File
@@ -52,8 +52,22 @@ $(document).ready(function() {
e.preventDefault();
displayLogin();
});
//Tab-index loop
$('form').each(function(){
var list = $(this).find('*[tabindex]').sort(function(a,b){ return a.tabIndex < b.tabIndex ? -1 : 1; }),
first = list.first();
list.last().on('keydown', function(e){
if( e.keyCode === 9 ) {
first.focus();
return false;
}
});
});
});
function displayForgotPassword() {
$('#error').hide();
$('#login_form').fadeOut('fast', function () {