diff options
author | Ugnich Anton | 2013-03-29 16:29:02 +0700 |
---|---|---|
committer | Ugnich Anton | 2013-03-29 16:29:02 +0700 |
commit | cdd48f30c7fca97327de48ff6b1cd9edf1629a5d (patch) | |
tree | 1544f451f0b7b2ace04a6a560f3cf89936a0892f /web/scripts3.js | |
parent | 19cf26ce2f8ee05fc8a9298e2c19b8fff589b8e6 (diff) |
Facebook signup
Diffstat (limited to 'web/scripts3.js')
-rw-r--r-- | web/scripts3.js | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/web/scripts3.js b/web/scripts3.js index 8be4d551..f4a21da3 100644 --- a/web/scripts3.js +++ b/web/scripts3.js @@ -96,23 +96,32 @@ function openSocialWindow(url) { if(window.focus) w.focus(); } +function checkUsername() { + var uname=$('#username').val(); + $.ajax('http://api.juick.com/users?uname='+uname).done(function() { + $('#username').css('background','#FFCCCC'); + }).fail(function() { + $('#username').css('background','#CCFFCC'); + }); +} + /******************************************************************************/ jQuery.fn.selectText = function(){ - var doc = document; - var element = this[0]; - console.log(this, element); - if (doc.body.createTextRange) { - var range = document.body.createTextRange(); - range.moveToElementText(element); - range.select(); - } else if (window.getSelection) { - var selection = window.getSelection(); - var range = document.createRange(); - range.selectNodeContents(element); - selection.removeAllRanges(); - selection.addRange(range); - } + var doc = document; + var element = this[0]; + console.log(this, element); + if (doc.body.createTextRange) { + var range = document.body.createTextRange(); + range.moveToElementText(element); + range.select(); + } else if (window.getSelection) { + var selection = window.getSelection(); + var range = document.createRange(); + range.selectNodeContents(element); + selection.removeAllRanges(); + selection.addRange(range); + } }; /* |