Reputation: 1514
I have the following in my initialisation code so that people can click on the image to dismiss the pop-up. But it isn't working. Any ideas?
$(document).ready(function() {
$('.image-link').magnificPopup({type:'image'});
});
$('.magnifierIcon').magnificPopup({
type: 'image',
image: {
// options for image content type
closeOnContentClick: true
}
// other options
});
thanks Derek
Now solved:
$(document).ready(function() {
$('.image-link').magnificPopup({type:'image'});
});
$('.magnifierIcon').magnificPopup({
type: 'image',closeOnBgClick: true,closeOnContentClick:true
// other options
});
Upvotes: 1
Views: 1261
Reputation: 4616
closeOnContentClick
is general option, not image option. So it should go after type:image
, not inside image:{}
.
Upvotes: 1