i am getting this error in my chrome console.username availaibility is workig fine. but password strength is not working. i m new in javascript please help me..
<script type="text/javascript">
$(function()
{
$('.user_name').keyup(function()
{
var checkname=$(this).val();
var availname=remove_whitespaces(checkname);
if(availname!='' && availname.length >= 5 ){
$('.check').show();
$('.check').fadeIn(400).html('</br> </br> <img src="img/ajax-loading.gif" style="height:20px;width:20px" /> ');
var String = 'username='+ availname;
$.ajax({
type: "POST",
url: "available.php",
data: String,
cache: false,
success: function(result){
var result=remove_whitespaces(result);
if(result==''){
$('.check').html(' </br> </br> <img src="img/accept.png" style="height:20px;width:20px" /> This Username Is Avaliable');
$(".check").removeClass("red");
$('.check').addClass("green");
$(".user_name").removeClass("yellow");
$(".user_name").addClass("white");
}else{
$('.check').html('</br> </br><img src="img/error.png" style="height:20px;width:20px" /> This Username Is Already Taken');
$(".check").removeClass("green");
$('.check').addClass("red")
$(".user_name").removeClass("white");
$(".user_name").addClass("yellow");
}
}
});
}else{
$('.check').html('');
}
});
$('.passwd').password_strength();
});
function remove_whitespaces(str){
var str=str.replace(/^\s+|\s+$/,'');
return str;
}
</script>
i am getting this error in my chrome console.username availaibility is workig fine. but password strength is not working. i m new in javascript please help me..