Good day.
There is a set of mini pictures in the HTML document
<a href="javascript:void(0);"><img class="miniVert" src="images/do_prof.jpg" onclick="setBigImage(this);" oncontextmenu="return false;"></a> By clicking on each, it is displayed in a larger size in the element:
<div id="resimagewrapper"> <img id="bigCertVert" src="images/teach_ut.jpg" oncontextmenu="return false;" /> </div> Using the function:
function setBigImage(obj){ document.getElementById('bigCertVert').src = obj.src; } All the pictures were of landscape orientation, so the dimensions of the #bigCertVert element were rigidly specified.
Now there are pictures of portrait orientation, created an output element in this orientation, it is required that the substitution function check the mini-image class and display a large size in the required element in accordance with it.
Need a solution on pure js . Thank you in advance.
className- Sublihim