A
A
Anton2017-04-02 23:04:05
WordPress
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() {
    $("#likes").delay(4500).fadeOut(500);
    })
    </script>

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)
Y
Yaroslav, 2018-03-01
@Sunrise23

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/real-estate-listing-...
https:// wordpress.org/plugins/wp-listings/
https://wordpress.org/plugins/easy-property-listings/
But there you already need to finish it.

A
Alexander Seryakov, 2017-04-03
@sizest

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

E
Eugene, 2017-04-02
@e_snegirev

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