Strange console errors in Milford School project


#1

Hi,

I'm getting strange console errors and nothing works. Here's the JS code:

For example, the console says I have unknown tokens, but when I remove them I get errors in the environment stating I'm missing tokens.

Any ideas?

var main = function() {
  $('.dropdown img').click(function() {
    $('.dropdown-menu').toggle();
	});
  $('.form').submit(function () {
    var email = $('#email').val();
    var passowrd = $('#password').val();
  
  	if(email === "") {
      $('.email-error').text("Please enter your password.");
    }
    
    if(password === "") {
      $('.password-error').text("Please enter your password.");
    }
  	return false;
  });

$(doucment).ready(main);

};

Thanks!


#2

Spelling error/typo.


#3

Thank you so much and you were so right. That got rid of all the errors in the console and the learning environment. Unfortunately, nothing seems to work.


#4

Can you please post a link to the exercise? Thanks.


#5

Hi,

https://www.codecademy.com/courses/jquery-ext/projects/jquery-prj_milford-school?user_id=550de3add3292f55fc001e95

Above is the link.

Thanks!


#6

This line has a typo, and is inside the function. It should be the last line of code, and below the function closing brace.

};
$(document).ready(main);

Still looking for other problems.


#7

Thanks.That did it. Next time I'll print the code out. I seem to find typos better that way.


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.