Reputation: 1
My element click event works perfectly on Android, but not working in iOS. Please help me.
HTML code:
<div class="img-thumbnail" src="../image/<?=$Image?>" data-toggle="modal" data-target="#myModal" data-image="../image/<?=$Image?>" style="width: 100%; height: 250px; overflow:hidden; display:block; background:url('../air/w250-h250/<?=$Image?>'); background-size:100%; background-repeat:no-repeat"></div>
jQuery code:
$('#myModal').on('show.bs.modal',function(event){
var button = $(event.relatedTarget) // Button that triggered the modal
$("#imagePrv").html('<img src="'+button.data('image')+'"width="100%" height="100%">');
})
Upvotes: 0
Views: 72
Reputation: 74738
I can suggest you this here:
type="text/javascript"
. <script type="text/javascript">
// modal code.
</script>
Upvotes: 0