You can use JavaScript's split method to get everything before the =
character and then use setTimeout to replace it with the full string after 1 second as follows:
// The Equation String
var s = '2 + 2 = 4';
// Split the String at the `=` Character
var splitString = s.split('=');
// Add the First Part of the String to the `div`
$('#answer').text(splitString[0]);
// Wait 1 Second and Show the Whole String
setTimeout(function(){
$('#answer').text(s);
}, 1000);
This will work with any equation that is a string and has the =
character as a delimiter.
Here is a JSFiddle Example.
I hope this helps!