If you don't mind the initial state being "shown", you can do this (which is what Rohan Kumar probably intended):
setInterval(function() {
$("#myDiv").show();
setTimeout(function() {
$("#myDiv").hide();
},10000);
},40000);
The repeat timer is set to every 40 seconds (the total interval of 30+10) and the hide occurs after a fixed timeout of 10 seconds.
There is also a timing
library that extends JQuery animation (to allow for repeats etc):
Then your code becomes something like:
$("#myDiv").repeat().wait(10000).show().wait(30000).hide();
Which I think is pretty cool.
If you don't mind the extra calls, or don't want an extra libary, go with Arun P Johny's answer.