Answer the question
In order to leave comments, you need to log in
Why might the bootstrap modal window not work if everything is done correctly?
I implemented a modal window from bootstrap, scripts and everything else is present, before the window worked and suddenly stopped, it didn’t move an inch in 5 hours. Maybe someone faced such a problem.
Landing address just in case: sportfresh.ru
<div class="dvigay">
<?php
include "admin/config.php";
$result = mysql_query("SELECT * FROM data ORDER BY id");
if($result === FALSE) {
die(mysql_error()); // TODO: better error handling
}
while($myrow = mysql_fetch_array($result))
{
$a_title = $myrow['title'];
$a_date = $myrow['date'];
$a_preview = $myrow['preview'];
$a_text = $myrow['text'];
$a_id = $myrow['id'];
?>
<!-- article body -->
<div class="col-md-4 facts-item">
<div class="article-type">
<img src="img/article.png" alt=""><span>статья</span>
</div>
<div class="article-link">
<!-- article link -->
<a href="#modal" class="block-scroll-article" data-toggle="modal" data-target="#myModal <?=$a_id?>"><?=$a_title?></a>
</div>
<div class="article-description">
<p><?=$a_preview?></p>
<div class="article-date">
<span><?=$a_date?></span>
</div>
</div>
<!-- modal window -->
<div class="modal fade" id="myModal'.$a_id.'" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<h1><?=$a_title?></h1>
<div class="modal-content">
<div class="modal-header">
<a href="#close" class="close close-modal-bootstrap close-modal-link" data-dismiss="modal" aria-hidden="true">
<img src="img/close-btn.png">
</a>
</div>
<div class="modal-body">
<?=$a_text?>
</div>
<div class="modal-footer">
<div class="ya-share2 social-icon" data-services="vkontakte,facebook,twitter" data-counter=""></div>
<div class="share-text">
<p>Поделиться статьей</p>
</div>
</div>
</div>
</div>
</div>
</div>
<?
}
?>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question