D
D
De Slow2017-01-07 18:47:52
css
De Slow, 2017-01-07 18:47:52

How to activate message widget with another button?

There is a message widget on the site page.
there is a call to action button, how to make it so that by clicking on it, the VK messages widget opens?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Peregudov, 2017-01-07
@igorperegudov

catch the click event on your cta button and add a click on the widget

$(document).ready(function() {
    $('.buybtn').on('click', function(){
        $('#wcm_button').click()
    });
});

K
Kirill Zhilyaev, 2017-01-07
@kirill_782

The widget is fully loaded from the VK site in a frame.
The only crutch is to hide the DIV wrapping the frame. But you need to install the widget immediately open.
But again - when you click on the cross, a standard button will appear ... Although you can track the size of the div, or close the cross with your div and hang a callback on it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question