mostrar y ocultar el texto JS Jquery
-
20-09-2019 - |
Pregunta
Quiero hacerlo cuando se acaba de introducir index.php aparecerá un texto durante 10 segundos, y luego se ocultará, cómo hacerlo? y esconderse como bien lentamente tengo jQuery
Solución
$(document).ready(function() {
var mySectionToFade = $('#myFadingSection');
setTimeout(function(){ mySectionToFade.fadeOut() }, 10000);
})
Otros consejos
¿Así?
<p class="text">My text</p>
<script>
window.setTimeout(function() {
$('.text').fadeOut();
}, 10000);
</script>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow