03/01/2015, 15:49:19
cmsms, je te l'avais ecrit dans le message precedent
[== HTML ==]
{* affichage des images de la galerie *}
<div class="row">{foreach from=$images item=image}
<div class="col-md-4 col-sm-6"><a href="lolo#myModal" title="{$image->titlename}"><img src="{$image->file|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" class="thumbnail img-responsive" /></a>
</div>
{/foreach}
</div>
{* la fenetre modal qui s'ouvre avec son image *}
<div id="myModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">X</button>
<h3 class="modal-title">Heading</h3>
</div>
<div class="modal-body ">
{* c'est ici que je souhaite avoir le commentaire *}
</div>
<div class="modal-footer">
<button class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
[== JavaScript ==]
$(document).ready(function() {
$('.thumbnail').click(function(){
$('.modal-body').empty();
var title = $(this).parent('a').attr("title");
$('.modal-title').html(title);
$($(this).parents('div').html()).appendTo('.modal-body');
$('#myModal').modal({show:true});
});
});