The site has a form with a mailchimp subscription. When you click "Subscribe" on top of this form you need to display a picture. I did not find ready-made solutions on the network (most likely I was looking badly), but I myself can’t figure out how to do it. Please help.
- We need an example of a form code or a picture showing how everything should look. - Eugene_21
|
1 answer
Hang the event on the button by which to sculpt the image on the desired block on top of it.
Using this.parentElement define the container in which the subscription form is located. We already insert the required image into it. With the help of css alignment, we do it on top, and so on, as required. If necessary, you can delete it in time with the same JS
- In the end, almost did. Two divas, in one picture, he initially in display: none styles, in the second form, he has display: block. When you press the button, the display parameter of each of the divos changes. Now it is necessary to make this piece work only with correctly entered data in the form, but this does not apply to the original question. - Dmitriy
|