Try this:
Depending on how the world is aligned, you may need another axis. And you will need to decide what happens when the player fails to jump high enough in time and gets hit with the side.