Hello, is it possible to make an auto click on a specific block / point immediately after the site loads? If so, how?

Closed due to the fact that the essence of the issue is not clear to the participants of Abyx , VenZell , D-side , Grundy , Artem 16 May '16 at 11:04 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • It depends. Where is the code located? What is the click on in the same document as the code? - D-side
  • Yes, the code is located in the same place - sholkingx
  • sholkingx, please insert into your question (using the β€œEdit” button) the code of the page where you want to auto-click. - Sasha Chernykh

1 answer 1

So if you need to click on a specific block on the page.

$(document).ready(function(){ // функция Π±ΡƒΠ΄Π΅Ρ‚ Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½Π° ΠΏΡ€ΠΈ ΠΏΠΎΠ»Π½ΠΎΠΉ Π·Π°Π³Ρ€ΡƒΠ·ΠΊΠ΅ страницы setTimeout(function(){ // Ссли Π½ΡƒΠΆΠ½ΠΎ устанавливаСм Π·Π°Π΄Π΅Ρ€ΠΆΠΊΡƒ выполнСния дСйствия $('#click-block').click(); // ΠΈΠΌΠΈΡ‚ΠΈΡ€ΡƒΠ΅ΠΌ Π½Π°ΠΆΠ°Ρ‚ΠΈΠ΅ ΠΊΠ½ΠΎΠΏΠΊΠΎΠΉ ΠΌΠΈΡˆΡ‹ Π½Π° Π±Π»ΠΎΠΊ },5000); // врСмя Π·Π°Π΄Π΅Ρ€ΠΆΠΊΠΈ Π² милисикундах }); 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="click-block">Π‘Π»ΠΎΠΊ ΠΏΠΎ ΠΊΠΎΡ‚ΠΎΡ€ΡƒΠΌΡƒ Π½ΡƒΠΆΠ½ΠΎ ΠΊΠ»ΠΈΠΊΠ½ΡƒΡ‚ΡŒ</div>