JQUERY - Can't get delay to work

I am pretty new to jquery, and am having trouble getting the delay to work in the code below.

Basically All I am trying to do is show a hidden div, and then when the mouse leaves that div delay for a second or two before it hides the div.

This seems simple enough but I haven’t been able to find anything on google that works. Any help would be great.
Thanks!

var childs = $('#as');
var parent1 = $('#nys');

childs.hide();
parent1.mouseover(function(){
childs.show('slow'); 

 })

childs.hover(
  function () {
    
  },
 function () {
    childs.delay(50).hide(slow);
  }
);

50 milliseconds is very fast, if you want the delay to work for 2 seconds you should try:


childs.delay(2000).hide(slow);