How to display the calculation result in the input field in jQuery? (Original question in Stackoverflow)

I am building a calculator. I am able to display the input value in the input field when the buttons are clicked but when the <button id="equals">

<button id="equalsButton" class="operator" value="=">=</button></td>

clicked the result value is appended instance of replacing it. For example, clicked 9, +, 9, =

Input field displays the input value: 9+918=

Input field:

<input id="display" name="display" disabled></input>

But I declared var clearDisplay = false; and it seems to work correctly (please play around and let me know if there any errors) but the operator does not display in the input field when the button is clicked.

I also think the script is a bit weird. Here is my code in the fiddle and original post in Stackoverflow.

jsfiddle
Question in Stackoverflow

I almost finishing with the project if you see other errors beside this current question please advice and I really appreciate your help!

Thank you in advance!