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
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> |