V
V
Vadim Yagofarov2018-06-19 09:58:09
JavaScript
Vadim Yagofarov, 2018-06-19 09:58:09

Problem with displaying modal window on re-call?

When clicking on the link of the modal window, it opens normally, but when re-opening or opening another window, it does not open. Or rather, it blinks, turns on for a split second and disappears. I am using modal.js. I call it with $('#myModal').modal(options).
Here in this block is a link to the modal window

{cms_pages category='14' amount='10' sort='sort' assign='pages'}
                                    {foreach key=key item=c from=$pages}
                                <div class="slider-news_item">
                                    <div class="row">
                                        <div class="col-md-6 col-sm-6">
                                            <img src="{$c.normal_photo}" alt="">
                                        </div>
                                        <div class="col-md-6 col-sm-6">
                                            <div class="desc">
                                                <div class="data">{$c.custom_field_1}</div>
                                                <div class="desc__head">{$c.name|strip_tags|truncate:100:"...":true}</div>
                                                <div class="dect__text">{$c.page_text|strip_tags|truncate:180:"...":true}</div>
                                                <a href="{$c.url}" class="btn" data-toggle="modal" data-target="#myModal">Подробнее</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>    
                                    {/foreach}

Those. news is loaded dynamically in this block. {$c.url} leads to a separate page.tpl template. If you take a standard modal window, then it is displayed correctly. I'm not sure but most of all it seems that this is the case, but can it be solved differently

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arman, 2018-06-19
@GIRUPC

check in the inspector whether the entire page is being reloaded, as an option, you can write something in which field and if you reset it, the entire page is updated. And all this happens because there are no events on the links / buttons that you make friends with Ayask, you need to transfer them to the parents.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question