Answer the question
In order to leave comments, you need to log in
How to generate id?
Good afternoon. The information block element is displayed on the site, when you click on the element, a modal window opens, which contains the announcement of this element.
here is the element code
<div class="sites-block-element-container " style="width: 180px;">
<a href="#openModal">
<div class="sites-block-element hov-activ" style="width:180px; height: 104px;" >
<span class="wrap">
<img
src="<?=$arItem["PREVIEW_PICTURE"]["SRC"]?>"
width="120px"
alt="<?=$arItem["PREVIEW_PICTURE"]["ALT"]?>"
/>
</span>
</div>
</div>
<div id="openModal" class="modalDialog">
<div style="text-align: center;">
<a href="#close" title="Закрыть" class="close">X</a>
<h2 ><?=$arItem["NAME"]?></h2>
<img
src="<?=$arItem["PREVIEW_PICTURE"]["SRC"]?>"
width="<?=$arItem["PREVIEW_PICTURE"]["WIDTH"]?>"
height="<?=$arItem["PREVIEW_PICTURE"]["HEIGHT"]?>"
alt="<?=$arItem["PREVIEW_PICTURE"]["ALT"]?>"
/>
<p style="text-align: left;"><?=$arItem["PREVIEW_TEXT"]?></p>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
<a href="#openModal"> -> <a href="#<?=$arItem["PREVIEW_PICTURE"]["ALT"]?>">
<div id="openModal" class="modalDialog"> -> <div id="<?=$arItem["PREVIEW_PICTURE"]["ALT"]?>" class="modalDialog">
but i'm not good at php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question