Browse files

Focus on nick reg input upon load

  • Loading branch information...
1 parent 5f4220d commit b8973f990d3e4389a89c5d7f150c0ff577071bf8 @olleman42 olleman42 committed Mar 12, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 js/jqchat.js
View
5 js/jqchat.js
@@ -55,11 +55,14 @@ $(document).ready(function() {
// ### Show and handle the registration form
regform: function() {
+ var nickreginput = $('input.regnick');
+ nickreginput[0].focus();
+
$('form#chatcontrols').hide(); // Hide the chat form
$('form#register').show().children("label").hide().end()
.children(".regsubmit").on("click", function(e) {
e.preventDefault();
- nick = $('input.regnick').val();
+ nick = nickregfocus.val();
if(!nick.validateNick()) {
$('label.regerror').hide();

0 comments on commit b8973f9

Please sign in to comment.