Stack Overflow em Português Asked by Sidnei Andrade on September 26, 2021
Gente boa tarde, estou com dificuldades com um javascript, preciso colocar uma link onde ao clicar o javascript simula a seta para baixo.
$(document).on('click', function (){
//função clicar e simular seta para baixo
});
Agradeço desde já a ajuda.
Seria algo assim?
$("#foo").on('click', function (){
jQuery.event.trigger({ type : 'keypress', which : 40 });
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a id='foo' href="#">Teste</a>
Answered by João Rocha on September 26, 2021
Seria isso?
$("#clique").click(function() {
$("html, body").animate({ scrollTop: $(document).height() }, 500);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="button" id="clique" name="clique" value="clique">
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<p>Teste</p>
Answered by Leandro on September 26, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP