Locking the camera's Y position while jumping.

I have a character which is the parent of a camera, when the character jumps, the camera jumps as well (no surprise). I would like to lock in the camera's Y position when the character jumps so it stays steady and no longer jolts upwards. I've wrote a script to do this but it doesn't work very well as the camera jitters when the player jumps while using it, here it is: EDIT: I should note that this is a third person game.

var originalY;

function Start(){
    originalY = transform.position.y;
}

function Update () {
    if(altThirdPersonController.isJumping==true){
        transform.position.y = originalY;
    }
}

You could always make "jumping" an animation and not actually move the object up and down.

Alternatively, you could have a parent object that the camera and model are both bound to (so they're siblings), and have the movement control this invisible object, and jumping only affect the model.