Javascript to click on a link it simulates the down arrow key

0

Good afternoon people, I'm having trouble with a javascript, I need to put a link where when I click the javascript it simulates the down arrow.

 $(document).on('click', function (){
       //função clicar e simular seta para baixo
 });

Thanks for the help right away.

    
asked by anonymous 01.06.2017 / 19:45

2 answers

0

Would that be?

$("#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><inputtype="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>
    
01.06.2017 / 20:03
0

Would it be something like this?

$("#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><aid='foo'href="#">Teste</a>
    
01.06.2017 / 20:23