how to move a child "window"???

Greeting everyone! 😛
i have the following problem:
i'm trying to make a top-down car game. In my index file i have a parent element named window and its child element named game(it's a canvas element). both elements have the same width but the child element height is twise as big.
my problem arises when i try to scroll down the child element("#game") while the car is moving up.
i tryied using

Code: Select all

$("#game").css("top",top+95);
without success...
i guess it have to be more complecated than that...

can anyone help me out please. i hope that i described the problem clearly enough

p.s. that's how i tried it.

Code: Select all

$(document).keydown(function(e){
      switch(e.keyCode){
         case 88://88-x key
            var force = new b2Vec2(0, -100000000);
            test1_Game.car.ApplyForce(force, test1_Game.car.GetCenterPosition());
            $("#game").css("top",top+95);
         break;   
      }
well i found a solution that meets my needs.
i used css-animation. i can scroll down the child element with css- animation and can control it with javascript!
so that's the solution to me!
if anyone want a bit more info on that tell me

Original thread: https://box2d.org/forum/viewtopic.php?t=9795