0

I have two php pages. On first page I have links and on another I have bootstrap modal. When I click on link I want to open modal window(another page) and get id there. How can I achieve that?

Here is jsfiddle

<div class="read_more" data-id="1"><a href='' data-toggle="modal">Read More...</a></div>
<div class="read_more" data-id="2"><a href='' data-toggle="modal">Read More...</a></div>
<div class="read_more" data-id="3"><a href='' data-toggle="modal">Read More...</a></div>

jQuery(document).ready(function($) {

  $('.read_more').click(function(e) {
    $('.portfolio-modal').modal('show');
  });
});
elene
  • 53
  • 1
  • 10
  • You must send your id between the pages (via session, cookies, get, post, ..) and then in the second page will read the id value and echo it into your bootstrap script. – pes502 Jun 17 '16 at 14:30
  • 2
    Possible duplicate of [Passing data to a bootstrap modal](http://stackoverflow.com/questions/10626885/passing-data-to-a-bootstrap-modal) – nerdlyist Jun 17 '16 at 14:30

0 Answers0