<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<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:
</head>
<body>
<div id="button"></div> <button type="button"> Click Me
</button>
</body>
And this is my script.js
(document).ready(function(){
(“button”).click(function(){
//action
});
});
<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
</head>
<body>
<div id="change_me"></div> <button id="button" type="button"> Click Me
</button>
</body>
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
got a new message on a later step…
code:
<title>Calculator</title>
</head>
<body>
<div id="calculator"
div id="total">
<div id="operators"
<a>+</a>
<a>-</a>
<a>/</a>
<a>*</a>
<a id="equal">=</a>
>
<div id="numbers">
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
<a>5</a>
<a>6</a>
<a>7</a>
<a>8</a>
<a>9</a>
<a>0</a>
</div>
</div>
</div>
</div>
</body>
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?
To format code so it’s visible, either wrap it in single backticks for a small amount of code, or triple backticks on an otherwise blank line before and after for a large amount of code.
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
https://www.codecademy.com/en/courses/web-intermediate-en-jfhjJ/3/3#2
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 ");
totaldiv.text(“0”);
//Add your .click() here!
$('#numbers a').not('#clear,#clearall').click(function(){
number += $(this).text();
totaldiv.text(number);
testNumLength(number);
});
});
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.