Anton2017-04-02 23:04:05
Anton, 2017-04-02 23:04:05

How to automatically close modal window with animation?

here is the code

<script type="text/javascript">
    $(window).load(function() {

but it only works before the body is loaded, I just need to press the button at any moment in my case "I like" a window pops out, it should close itself after some time, while with animation, the code works but only if you click on button before the entire body is loaded, but I need it to work after loading the body, I’m not strong in JS, alas ...
help please)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Yaroslav, 2018-03-01

Good afternoon!
The most suitable plugin for your task is this one, I think: https://wordpress.org/plugins/estatik/
There are other options:
https:// wordpress.org/plugins/wp-listings/
But there you already need to finish it.

Alexander Seryakov, 2017-04-03

I sketched an example, if I understood correctly https://jsfiddle.net/ruzqg3nL/10/
you need jquery connection

Eugene, 2017-04-02

When opening a modal window, create a window opening event via trigger. and then catch the window opening event, in which we will close it after some time using setTimeout

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question