وردپرس

How to execute delayed JavaScript after n seconds?


I am using the Litespeed Cache plugin on my WordPress website (http://www.theidioms.com). And I’ve enabled delayed JavaScript. It works well, and JS doesn’t get executed until the user interacts.

But I also want to execute the JS after n seconds, along with the current event of user interaction, whichever occurs earlier.

In my case, I want to delay JS by a maximum of 4 seconds if the user doesn’t interact. Because within 2 seconds, my page was fully loaded. This feature is available with the third-party plugin Flying Scripts.

How can I achieve this with Litespeed without going with other plugins?

I look forward to your kind cooperation.

Thanks and best regards,
Team Theidioms.com

  • This topic was modified 1 minute ago by theidioms.

The page I need help with: [log in to see the link]

این خبر را در ایران وب سازان مرجع وب و فناوری دنبال کنید

مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد

منبع: انجمن وردپرس

دکمه بازگشت به بالا