Quantcast
Viewing all articles
Browse latest Browse all 92756

Re: How do I set document property with delay using jquery?

A quick Google search pulls up the setTimeOut function:

 

<script>

$(document).ready(function() {

$("#DivStage2").delay(1000).fadeIn(1000);

 

setTimeout(function () {

        $("#two").css("color" , "#fff");

    }, 20000);

 

$("#DivStage2").delay(56000).fadeOut(1000);       

                                                                                                            

});

</script>

 

 

I'd change the name of you h2 to 'one' and 'two' to avoid using numbers:

 

<div id="DivStage2" >

<h2 id="one">Topic1</h2>

<h2 id="two">Topic2</h2>

</div>


Viewing all articles
Browse latest Browse all 92756

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>