Build a Calculator! -- Make sure the button has the exact id 'button'


<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>


I get this message everytime “Make sure the button has the exact id ‘button’” this is my code:

<div id="button"></div> <button type="button"> Click Me 

And this is my script.js
(document).ready(function(){ (“button”).click(function(){

<do not remove the three backticks above>

This is the html and css forum, can you post the url of the exericse?

You should add the id="button" to your <button>, and a id of change_me to your div

<div id="change_me"></div> <button id="button" type="button"> Click Me 

Like this then?

Almost, the button should be inside the div:

<div id="change_me"><!-- button here --></div>

i haven’t looked at jquery code, do i need to?

I added one more thing to the jquery and it worked.

So issue resolved? Good to hear :slight_smile:

got a new message on a later step…


<div id="calculator" 
div id="total">
<div id="operators"
<a id="equal">=</a>
<div id="numbers">

message :Your number links need to be in the #numbers div!

remove head just so you can see my code.

Again, exactly which exercise is this?

This line:

<div id="operators"<!-- missing > here -->

the > ended up after equal:

<a id="equal">=</a>
><!-- here is your missing > -->

it seems you need to close your div#operators with a div closing tag (</div>) before your div#numbers

solved!!!:grinning: thanks a lot

Getting this error :Did you define the ‘.click()’ correctly? Look at the hint if you need help

(document).ready(function(){ var testNumLength = function(number) { if (number.length > 9) { totaldiv.text(number.substr(number.length-9,9)); if (number.length > 15) { number = ""; totaldiv.text("Err"); } } }; var number = ""; var newnumber = ""; var operator = ""; var totaldiv = ("#total");

//Add your .click() here!
$('#numbers a').not('#clear,#clearall').click(function(){
   number += $(this).text();


I haven’t done jquery in ages, please make a new topic so someone else can take it from here

posted in javascript but no answer, might want to post it in Jquery aswell?

Patient my friend, this is a forum, not a instant chat response. No, keep the forum clean, do not create multiply topics for the same question

This is a known bug on our side. We’ll try to fix this asap.
Sorry for the inconvenience.