You've got a lot of answers here that rewrite your code to make it work, but not much explanation of why your code didn't work.
First the easy part: display: yes isn't a thing; allowed values for display include block, inline, and none. (As well as a couple dozen other values, but not "yes".)
Correcting that "show" class to use display: block instead of display: yes doesn't solve the problem on its own, though: your div has the class "hide", and you're toggling the class "show" on and off (without removing the "hide" class.) Therefore the two toggle states are "hide" or "show hide" (both classes together).
And because the "hide" class is after the "show" class in the CSS, it takes precedence, so when both classes are on the same element the "hide" class wins.
There are several different ways to solve this: you could not use the "show" class at all, and just toggle the "hide" class on and off. Or you could toggle both classes simultaneously:
$post.toggleClass("show hide");
// Or use $post.toggleClass("show").toggleClass("hide"); same thing
Since the initial state of the div is "hide" (by itself), toggling both show and hide classes together would mean the next state would be "show" (by itself), then back to "hide" (by itself.)
A couple of other minor points:
- As mentioned in @rbester's answer, it might be safer to use an explicit identifier on the div, instead of capturing it using the same classname you'll later be toggling on and off. It works okay in your code because you're capturing the div in the variable
$post, but it'd be easy to later on accidentally try to refer to it as $('.hide') inside the setInterval loop, which wouldn't always match the element you want.
- It's not necessary to set both
display:none and visibility:hidden to hide the element. Either one on its own will hide the element (though not exactly the same way. Setting visibility:hidden will hide the element but still leaves space for it in the layout. display:none removes it from the layout completely. In most situations display:none is what you want.)