Let's say I have the following link that generates X times in a loop.
<a class="btn" data-toggle="modal" data-target="#view_more" href="/item/view/<?php echo $item_id; ?>">Launch Modal</a>
Here's the JS script that initiates the modal.
$(document).ready(function () {
$('#view_more').modal({
remote: '/item/view/1',
show:false
});
It works when the URL is remotehard-coded, but I would like it to be dynamic depending on what is passed to it.
source
share