Permalink
Browse files

Focus on nick reg input upon load

  • Loading branch information...
1 parent 5f4220d commit fbb6b60c94c3f17a9d7ec08f25fff2852b87ed51 @olleman42 olleman42 committed with Mar 12, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 js/jqchat.js
View
@@ -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 fbb6b60

Please sign in to comment.