JSFiddle - React, Tailwind, and code Playground
by wwt
HTML
<a href="#test" id="link"><img src="http://www.xn--e1aahbxctdme.xn--p1ai/1/m7.jpg" alt="Печатный каталог"/></a>
<div id="test"><script type="text/javascript" src="http://form.jotformeu.com/jsform/22902754026349"></script> </div>
CSS
#link {
width: 309px;
display:block;
border:0px solid #ccc;
border-radius:0px;
padding:0px;
}
#link.active {
width: 309px;
border-bottom:0;
border-radius: 0px 0px 0 0;
}
#test {
width: 309px;
border:1px solid #ccc;
border-top:0;
border-radius: 0 0 0px 0px ;
padding:0px;
display:none;
}
JavaScript
window.onload = function(){
document.getElementById("link").onclick = function(){
if(/active/.test(this.className)){
this.className = "";
document.getElementById("test").style.display = "none";
}else{
this.className = "active";
document.getElementById("test").style.display = "block";
}
}
};