Listener and condition

Listener and condition

Hi everyone,

sorry for my english...

So, there is my issue :

I've got a div "blue" of 200px * 100px.
I've got a div "green" of 200px * 0px.
When the cursor is over the divBlue, the divGreen's height grow to 100px.
When the cursor is out the divBlue, the divGreeb's height reduce to 0px.

The thing is the divGreen can't reduce until her height is 100px.

I would like something like that : "if (divBlue.mouseout ==true && divGreen.height() == 100) { here, I reduce the height }".
I obviously the "divGreen.mouseout == true" that I can't write...

How can I say "If the cursor est out the divBlue and the divGreen's height is 100px, so I reduce the height".

I don't know how I can put a listener on the divBlue.

I hope I was enough clear

Thanks in advance !