Functions, Part I: $(document).ready doesn't work but lets me pass!



I've created this code;




The div isn't hiding, it's reporting a syntax error, but it's letting me pass. Am I missing something obvious?

Thanks for your help.


Hi Bob,

You should remove the $('div').ready(...); part and put $('div').hide(); inside just the $(document).ready(...); part :slight_smile:

How it should look

$(document).ready(function() {


I am experiencing the same problem. I have filed a bug report about the autograder letting incorrect code to pass.


Great thanks!

I also then realised that I had put my curly and normal brackets round the wrong way on the final line!


@dj_mousefarm Good eye :slight_smile: Sometimes fixing just one problem will reveal several others :slight_smile:


This topic is solved.