I am new to bootstrap 3 and my coding doesnt seem to pass the php value to a modal? I usually code like this in bootstrap 2++, i decided to add data target also, this is my code:
<a class="btn btn-link"
href="#reply<?php echo $product_id; ?>"
data-toggle="modal"
data-target="#reply<?php echo $product_id; ?>">
<i class="icon-reply"></i>
Reply
</a>
and for the modal:
<a class="btn btn-link"
href="#reply<?php echo $product_id; ?>"
data-toggle="modal"
data-target="#reply<?php echo $product_id; ?>">
<i class="icon-reply"></i>
Reply
</a>
what am i missing?
According to the migration guide from Bootstrap 2 to Bootstrap 3, there were a few non-compatible changes made, specifically to the modal
object. It looks like in your case, you need to remove the hide
class from your modal in order to work in Bootstrap 3:
[...] you should no longer apply
.hide
to.modal
in your markup.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.