wait for the end of animation in the corotinue of my main character

Hi everyone, i am new to unity and writing my first game,
while i find some problem about animation.

function Update () {
     if(Input.GetKey("i")) {

function anotherAnimation(){
     yield WaitForSeconds (animation["jumping"].length);

i found that only the function have wait but the update function still working
and the idle animation start to play all the time, which means the jump do not play at all.

are there any ways to stop the update before the jumps end?

Create a boolean variable, set it to true in at the start of your anotherAnimation() function and to end on the last line. Also check for that boolean in update function before you start anotherAnimation().