The following code I am using works fine and it does what I want, but it just seems really sloppy and wanted to implement the 'replaceWith' function to make it cleaner.
I want to show div1 for 10 secs, hide the div, and then show div2 for 10 secs, hide the div and show div3 etc...
Can someone please help me clean this up using the replaceWith function.
<script type="text/javascript">
jQuery(function($){
setTimeout(function() {
$('#below-post-block-1').hide();},
10000);
});
jQuery(function($){
setTimeout(function() {
$('#below-post-block-2').show();},
10000);
});
jQuery(function($){
setTimeout(function() {
$('#below-post-block-2').hide();},
20000);
});
jQuery(function($){
setTimeout(function() {
$('#below-post-block-3').show();},
20000);
});
</script>
Thanks in advance -Paul